diff --git a/agents/src/voice/audio_recognition.ts b/agents/src/voice/audio_recognition.ts index 2584432bc..83cb6d1f5 100644 --- a/agents/src/voice/audio_recognition.ts +++ b/agents/src/voice/audio_recognition.ts @@ -1404,8 +1404,18 @@ export class AudioRecognition { this.audioInterimTranscript = ''; this.audioPreflightTranscript = ''; this.finalTranscriptConfidence = []; + this.lastFinalTranscriptTime = 0; + this.speechStartTime = undefined; + this.lastSpeakingTime = undefined; + this.speaking = false; this.userTurnCommitted = false; + if (this.userTurnSpan?.isRecording()) { + this.userTurnSpan.end(); + } + this.userTurnSpan = undefined; + this.sttRequestIds = []; + const restartStt = async () => { const unlock = await this.sttLifecycleLock.lock(); try {