Skip to content

Commit 58c51ad

Browse files
committed
Revert handleAudioReady to original - remove broken checks
1 parent 5e99a39 commit 58c51ad

1 file changed

Lines changed: 2 additions & 14 deletions

File tree

web/index.html

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1505,23 +1505,11 @@ <h1>C.O.R.A</h1>
15051505
}
15061506

15071507
// Convert ArrayBuffer back to Float32Array
1508-
const float32Audio = data && data.audio ? new Float32Array(data.audio) : new Float32Array(0);
1509-
const sampleRate = data?.sampleRate || 24000;
1508+
const float32Audio = new Float32Array(data.audio);
1509+
const sampleRate = data.sampleRate || 24000;
15101510
const duration = float32Audio.length / sampleRate;
15111511
console.log(`[TTS] Audio ready: ${float32Audio.length} samples, ${duration.toFixed(1)}s duration`);
15121512

1513-
// Check for empty or near-empty audio (less than 0.05 seconds = basically silence)
1514-
if (float32Audio.length < sampleRate * 0.05) {
1515-
console.warn(`[TTS] Audio too short (${float32Audio.length} samples), showing text only`);
1516-
if (text) {
1517-
document.getElementById('speechText').textContent = `"${text}"`;
1518-
log(`CORA: "${text}"`, 'cora');
1519-
}
1520-
stopWaveform();
1521-
resolve();
1522-
return;
1523-
}
1524-
15251513
// Create audio buffer and play it
15261514
const audioBuffer = audioContext.createBuffer(1, float32Audio.length, sampleRate);
15271515
audioBuffer.copyToChannel(float32Audio, 0);

0 commit comments

Comments
 (0)