I shouldn't have to write all of this code.
interfaceReplicateOutput{url: ()=>string;blob: ()=>Promise<Blob>;}interfaceReplicateError{error?: string;}typeReplicateResponse=ReplicateOutput|ReplicateError;constoutput=(awaitreplicate.run(model,{
input,},onProgress,))asReplicateResponse;constoutputUrl=(outputasReplicateOutput).url();constaudioBuffer=await(outputasReplicateOutput).blob();
I shouldn't have to write all of this code.