There was an error while loading. Please reload this page.
1 parent a943cde commit 035c96eCopy full SHA for 035c96e
1 file changed
agents/src/voice/audio_recognition.ts
@@ -283,7 +283,7 @@ export class AudioRecognition {
283
}
284
285
const eventsToEmit =
286
- emitFromIndex && shouldFlush ? this.transcriptBuffer.slice(emitFromIndex) : [];
+ emitFromIndex && shouldFlush !== undefined ? this.transcriptBuffer.slice(emitFromIndex) : [];
287
288
this.transcriptBuffer = [];
289
this.ignoreUserTranscriptUntil = undefined;
@@ -373,7 +373,7 @@ export class AudioRecognition {
373
);
374
this.transcriptBuffer.push(ev);
375
return;
376
- } else if (this.transcriptBuffer) {
+ } else {
377
await this.flushHeldTranscripts();
378
// no return here to allow the new event to be processed normally
379
0 commit comments