fix: speech size 0, do not create url

This commit is contained in:
jialin
2024-11-29 21:09:03 +08:00
parent e622636686
commit 1ac3768468
8 changed files with 77 additions and 18 deletions
+1 -1
View File
@@ -98,7 +98,7 @@ export const textToSpeech = async (params: any, options?: any) => {
}
const audioBlob = await res.blob();
const audioUrl = URL.createObjectURL(audioBlob);
const audioUrl = audioBlob.size > 0 ? URL.createObjectURL(audioBlob) : '';
return {
url: audioUrl,
type: audioBlob.type