Compare commits

...

1 Commits

Author SHA1 Message Date
Peng Xiao
5758d5eba5 chore: test o4-transcribe 2025-07-16 16:57:56 +08:00

View File

@@ -135,14 +135,11 @@ export class AudioAttachmentBlock extends Entity<AttachmentBlockModel> {
if (!buffer) { if (!buffer) {
throw new Error('No audio buffer available'); throw new Error('No audio buffer available');
} }
const slices = await encodeAudioBlobToOpusSlices(buffer, 64000); return [
const files = slices.map((slice, index) => { new File([buffer], this.props.props.name + '.mp3', {
const blob = new Blob([slice], { type: 'audio/opus' }); type: 'audio/mpeg',
return new File([blob], this.props.props.name + `-${index}.opus`, { }),
type: 'audio/opus', ];
});
});
return files;
}, },
}); });