From e8faf28e6a39ff90bc921ad125864504d1df8aba Mon Sep 17 00:00:00 2001 From: Sam Sykes Date: Thu, 31 Jul 2025 22:30:54 +0100 Subject: [PATCH 1/3] Doc fix for incorrect argument name. --- examples/foundational/13h-speechmatics-transcription.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/foundational/13h-speechmatics-transcription.py b/examples/foundational/13h-speechmatics-transcription.py index ea75702e6..2a9e7552e 100644 --- a/examples/foundational/13h-speechmatics-transcription.py +++ b/examples/foundational/13h-speechmatics-transcription.py @@ -48,7 +48,7 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si This example will use diarization within our STT service and output the words spoken by each individual speaker and wrap them with XML tags. - If you do not wish to use diarization, then set the `enable_speaker_diarization` parameter + If you do not wish to use diarization, then set the `enable_diarization` parameter to `False` or omit it altogether. The `text_format` will only be used if diarization is enabled. By default, this example will use our ENHANCED operating point, which is optimized for From c2282b0e73b7a0b4d5c5c2f67a3b7bba42141784 Mon Sep 17 00:00:00 2001 From: Sam Sykes Date: Sun, 3 Aug 2025 22:08:22 +0100 Subject: [PATCH 2/3] Set `user_id` to "" (not `None`) for `RTVIProcessor`. --- src/pipecat/services/speechmatics/stt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pipecat/services/speechmatics/stt.py b/src/pipecat/services/speechmatics/stt.py index d6c947d38..6859306d3 100644 --- a/src/pipecat/services/speechmatics/stt.py +++ b/src/pipecat/services/speechmatics/stt.py @@ -191,7 +191,7 @@ class SpeakerFragments: passive_format = active_format return { "text": self._format_text(active_format if self.is_active else passive_format), - "user_id": self.speaker_id, + "user_id": self.speaker_id or "", "timestamp": self.timestamp, "language": self.language, "result": [frag.result for frag in self.fragments], From e07db88bc0cb55054aa18fe76912f93a758acfdf Mon Sep 17 00:00:00 2001 From: Sam Sykes Date: Sun, 3 Aug 2025 22:11:10 +0100 Subject: [PATCH 3/3] Updated changelog. --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e3b82dde..56f2e1c59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed an issue with the `TavusVideoService` where an error was thrown due to missing transcription callbacks. +- Fixed an issue in `SpeechmaticsSTTService` where the `user_id` was set to + `None` when diarization is not enabled. + ### Performance - Fixed an issue in `TaskObserver` (a proxy to all observers) that was degrading