diff --git a/CHANGELOG.md b/CHANGELOG.md index af91cb43d..f0f9cea39 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,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 diff --git a/examples/foundational/13h-speechmatics-transcription.py b/examples/foundational/13h-speechmatics-transcription.py index 173d0641c..92c8d4f91 100644 --- a/examples/foundational/13h-speechmatics-transcription.py +++ b/examples/foundational/13h-speechmatics-transcription.py @@ -49,7 +49,7 @@ async def run_bot(transport: BaseTransport): 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 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],