fix: audio api error message

This commit is contained in:
jialin
2024-12-04 19:02:10 +08:00
parent b9e8dea5d9
commit 38daa0826e
5 changed files with 65 additions and 55 deletions
+1 -1
View File
@@ -94,7 +94,7 @@ export const textToSpeech = async (params: any, options?: any) => {
signal: params.signal
});
if (!res.ok) {
throw new Error('Network response was not ok');
return await res.json();
}
const audioBlob = await res.blob();