Skip to content

Commit 46e6453

Browse files
committed
Revert all TTS changes - back to original with just debug logs
1 parent 58c51ad commit 46e6453

2 files changed

Lines changed: 1 addition & 22 deletions

File tree

web/index.html

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1611,17 +1611,6 @@ <h1>C.O.R.A</h1>
16111611

16121612
console.log(`[TTS] speak() called: kokoroReady=${kokoroReady}, useFallback=${useFallbackTTS}, text="${speakText.substring(0,50)}..."`);
16131613

1614-
// If text is empty after stripping URLs, just show the original text and skip TTS
1615-
if (!speakText || speakText.length < 2) {
1616-
console.warn('[TTS] Text empty after stripping URLs, showing original text only');
1617-
if (displayText) {
1618-
document.getElementById('speechText').textContent = `"${displayText}"`;
1619-
log(`CORA: "${displayText}"`, 'cora');
1620-
}
1621-
if (callback) callback();
1622-
return;
1623-
}
1624-
16251614
if (kokoroReady && !useFallbackTTS) {
16261615
// Use Kokoro neural TTS - speakText for TTS, displayText for log
16271616
const id = ++messageId;

web/kokoro-worker.js

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -87,20 +87,10 @@ async function handleGenerate(id, data) {
8787

8888
const { text, voice, speed } = data;
8989

90-
// Validate text before generating
91-
if (!text || typeof text !== 'string' || text.trim().length < 2) {
92-
console.warn('[KOKORO] Empty or invalid text received, skipping generation');
93-
self.postMessage({ type: 'error', id, error: 'Text too short or empty' });
94-
return;
95-
}
96-
97-
const cleanText = text.trim();
98-
console.log(`[KOKORO] Generating audio for: "${cleanText.substring(0, 50)}..."`);
99-
10090
try {
10191
self.postMessage({ type: 'generating', id });
10292

103-
const audio = await tts.generate(cleanText, {
93+
const audio = await tts.generate(text, {
10494
voice: voice || DEFAULT_VOICE,
10595
speed: speed || 1.0
10696
});

0 commit comments

Comments
 (0)