We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0a31ad3 commit 53105d0Copy full SHA for 53105d0
1 file changed
worker.js
@@ -83,6 +83,12 @@ self.addEventListener("message", async (e) => {
83
if (type === "generate" && text) {
84
shouldStop = false;
85
86
+ // CRITICAL FIX: Ensure valid voice ID is used
87
+ if (!voice || !tts.voices[voice]) {
88
+ console.warn(`Invalid voice "${voice}", defaulting to "af_heart". Available voices:`, Object.keys(tts.voices));
89
+ voice = "af_heart"; // Default to a known good voice
90
+ }
91
+
92
// MINIMAL FIX ONLY: Reduced chunk size from 800 to 250 for better reliability
93
let sentences = splitTextSmart(text, 250); // 250 instead of 800 - targets successful 112-char range
94
let currentTTS = tts;
0 commit comments