fix: use html audio to load stream

This commit is contained in:
jialin
2026-03-17 16:35:55 +08:00
committed by jialin
parent c29ad1270b
commit 9aae2c7f50
17 changed files with 1000 additions and 385 deletions
+1 -9
View File
@@ -155,16 +155,8 @@ export const textToSpeech = async (params: any, options?: any) => {
}
const audioBlob = await res.blob();
if (audioBlob?.type?.indexOf('audio') === -1) {
return {
url: '',
type: ''
};
}
const audioUrl = audioBlob.size > 0 ? URL.createObjectURL(audioBlob) : '';
return {
url: audioUrl,
type: audioBlob.type
audioBlob
};
};