diff --git a/public/src/tts.js b/public/src/tts.js index 2dcd195..71e4032 100644 --- a/public/src/tts.js +++ b/public/src/tts.js @@ -240,8 +240,8 @@ export async function speakTextStreaming(text, voice = "alloy", rate = 0.9, mode chunks.push(value); totalBytes += value.byteLength; - // Queue the chunk for appending - appendQueue.push(value.buffer); + // Queue the chunk for appending (use slice to avoid shared ArrayBuffer issues) + appendQueue.push(value.slice().buffer); processQueue(); // Auto-play once we have some data