-
Notifications
You must be signed in to change notification settings - Fork 241
Open
Description
I shouldn't have to write all of this code.
interface ReplicateOutput {
url: () => string;
blob: () => Promise<Blob>;
}
interface ReplicateError {
error?: string;
}
type ReplicateResponse = ReplicateOutput | ReplicateError;
const output = (await replicate.run(
model,
{
input,
},
onProgress,
)) as ReplicateResponse;
const outputUrl = (output as ReplicateOutput).url();
const audioBuffer = await (output as ReplicateOutput).blob();Metadata
Metadata
Assignees
Labels
No labels