diff --git a/src/lib/utils/realtime-audio.js b/src/lib/utils/realtime-audio.js index 7337472487..cf9b88359d 100644 --- a/src/lib/utils/realtime-audio.js +++ b/src/lib/utils/realtime-audio.js @@ -23,10 +23,7 @@ class RealtimeAudioProcessor extends AudioWorkletProcessor { this.enabled = data.enabled; this.captureLength = 0; } else if (data.type === 'audio') { - if (this.queued + data.samples.length > 24000 * 120) { - this.port.postMessage({ type: 'overflow' }); - return; - } + // Speech can arrive faster than playback; release each chunk after it plays. this.received += data.samples.length; this.queue.push({ ...data, offset: 0 }); this.queued += data.samples.length; diff --git a/src/lib/utils/realtime.ts b/src/lib/utils/realtime.ts index e3fc5beae0..efdf6355ee 100644 --- a/src/lib/utils/realtime.ts +++ b/src/lib/utils/realtime.ts @@ -223,9 +223,6 @@ export class RealtimeCall { this.options.change(); } this.flush(); - } else if (data.type === 'overflow') { - this.stopSpeaking(); - this.fail('Voice playback exceeded the 120 second buffer.'); } else if (data.type === 'cleared') { const responses = this.clears.get(data.id); this.clears.delete(data.id);