mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-08-31 11:23:08 +02:00
Update speak.js
This commit is contained in:
parent
8272be81f3
commit
567f3e0ab4
1 changed files with 3 additions and 3 deletions
|
@ -53,8 +53,8 @@ $s.Speak('${txt.replace(/'/g,"''")}'); $s.Dispose()"`
|
||||||
try {
|
try {
|
||||||
let audioData = await sendAudioRequest(txt, mdl, voice, url);
|
let audioData = await sendAudioRequest(txt, mdl, voice, url);
|
||||||
if (!audioData) {
|
if (!audioData) {
|
||||||
audioData = "SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU5LjI3LjEwMAAAAAAAAAAAAAAA/+NAwAAAAAAAAAAAAEluZm8AAAAPAAAAAAAAANAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAExhdmM1OS4zNwAAAAAAAAAAAAAAAAAAAAAAAAAAAADQAAAeowAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==";
|
throw new Error("TTS model did not return audio data");
|
||||||
// ^ 0 second silent audio clip
|
// will be handled below
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isWin) {
|
if (isWin) {
|
||||||
|
@ -80,7 +80,7 @@ $s.Speak('${txt.replace(/'/g,"''")}'); $s.Dispose()"`
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('Audio error', e);
|
console.error('[TTS] Audio error', e);
|
||||||
processQueue();
|
processQueue();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue