From 960d0faea5f39ff2d2d0ede3f6d28950bb783ba0 Mon Sep 17 00:00:00 2001 From: Sam Sykes Date: Mon, 26 Jan 2026 15:48:04 +0000 Subject: [PATCH] support `is_eou` for final segment in utterance --- src/pipecat/services/speechmatics/stt.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/pipecat/services/speechmatics/stt.py b/src/pipecat/services/speechmatics/stt.py index 457388c31..8d45b4e9d 100644 --- a/src/pipecat/services/speechmatics/stt.py +++ b/src/pipecat/services/speechmatics/stt.py @@ -738,9 +738,16 @@ class SpeechmaticsSTTService(STTService): # If final, then re-parse into TranscriptionFrame if finalized: - frames += [TranscriptionFrame(**attr_from_segment(segment)) for segment in segments] + frames += [ + TranscriptionFrame( + **attr_from_segment(segment), finalized=segment.get("is_eou", False) + ) + for segment in segments + ] finalized_text = "|".join([s["text"] for s in segments]) - await self._handle_transcription(finalized_text, True, segments[0]["language"]) + await self._handle_transcription( + finalized_text, is_final=True, language=segments[0]["language"] + ) logger.debug(f"{self} finalized transcript: {[f.text for f in frames]}") # Return as interim results (unformatted)