Fix MSE garbling: copy chunk data to avoid shared ArrayBuffer
This commit is contained in:
parent
092b3c72b2
commit
460bfd6b2a
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue