Skip to content

Commit 035c96e

Browse files
committed
bugfixes
1 parent a943cde commit 035c96e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

agents/src/voice/audio_recognition.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ export class AudioRecognition {
283283
}
284284

285285
const eventsToEmit =
286-
emitFromIndex && shouldFlush ? this.transcriptBuffer.slice(emitFromIndex) : [];
286+
emitFromIndex && shouldFlush !== undefined ? this.transcriptBuffer.slice(emitFromIndex) : [];
287287

288288
this.transcriptBuffer = [];
289289
this.ignoreUserTranscriptUntil = undefined;
@@ -373,7 +373,7 @@ export class AudioRecognition {
373373
);
374374
this.transcriptBuffer.push(ev);
375375
return;
376-
} else if (this.transcriptBuffer) {
376+
} else {
377377
await this.flushHeldTranscripts();
378378
// no return here to allow the new event to be processed normally
379379
}

0 commit comments

Comments
 (0)