From 5758d5eba55209a7e21fb6bde64a8884fa97f970 Mon Sep 17 00:00:00 2001 From: Peng Xiao Date: Wed, 16 Jul 2025 16:57:56 +0800 Subject: [PATCH] chore: test o4-transcribe --- .../media/entities/audio-attachment-block.ts | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/packages/frontend/core/src/modules/media/entities/audio-attachment-block.ts b/packages/frontend/core/src/modules/media/entities/audio-attachment-block.ts index 5e4c8c972b..72c15fd2d0 100644 --- a/packages/frontend/core/src/modules/media/entities/audio-attachment-block.ts +++ b/packages/frontend/core/src/modules/media/entities/audio-attachment-block.ts @@ -135,14 +135,11 @@ export class AudioAttachmentBlock extends Entity { if (!buffer) { throw new Error('No audio buffer available'); } - const slices = await encodeAudioBlobToOpusSlices(buffer, 64000); - const files = slices.map((slice, index) => { - const blob = new Blob([slice], { type: 'audio/opus' }); - return new File([blob], this.props.props.name + `-${index}.opus`, { - type: 'audio/opus', - }); - }); - return files; + return [ + new File([buffer], this.props.props.name + '.mp3', { + type: 'audio/mpeg', + }), + ]; }, });