Merge pull request #2879 from sam-s10s/fix/smx-vocab

Fix for SpeechmaticsSTTService AdditionVocabEntry entries
This commit is contained in:
Mark Backman
2025-10-18 09:27:23 -04:00
committed by GitHub
3 changed files with 8 additions and 2 deletions

View File

@@ -37,9 +37,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `CartesiaSTTService` now inherits from `WebsocketSTTService`. - `CartesiaSTTService` now inherits from `WebsocketSTTService`.
- Package upgrades: - Package upgrades:
- `openai` upgraded to support up to 2.x.x. - `openai` upgraded to support up to 2.x.x.
- `openpipe` upgraded to support up to 5.x.x. - `openpipe` upgraded to support up to 5.x.x.
- `SpeechmaticsSTTService` updated dependencies for `speechmatics-rt>=0.5.0`.
### Fixed ### Fixed
- Fixed an issue in `RivaSegmentedSTTService` where a runtime error occurred due - Fixed an issue in `RivaSegmentedSTTService` where a runtime error occurred due
@@ -66,6 +69,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
incorrectly 16-bit aligned audio frames, potentially leading to internal incorrectly 16-bit aligned audio frames, potentially leading to internal
errors or static audio. errors or static audio.
- Fixed an issue in `SpeechmaticsSTTService` where `AdditionalVocabEntry` items
needed to have `sounds_like` for the session to start.
### Other ### Other
- Added foundational example `47-sentry-metrics.py`, demonstrating how to use the - Added foundational example `47-sentry-metrics.py`, demonstrating how to use the

View File

@@ -102,7 +102,7 @@ silero = [ "onnxruntime>=1.20.1,<2" ]
simli = [ "simli-ai~=0.1.10"] simli = [ "simli-ai~=0.1.10"]
soniox = [ "pipecat-ai[websockets-base]" ] soniox = [ "pipecat-ai[websockets-base]" ]
soundfile = [ "soundfile~=0.13.0" ] soundfile = [ "soundfile~=0.13.0" ]
speechmatics = [ "speechmatics-rt>=0.4.0" ] speechmatics = [ "speechmatics-rt>=0.5.0" ]
strands = [ "strands-agents>=1.9.1,<2" ] strands = [ "strands-agents>=1.9.1,<2" ]
tavus=[] tavus=[]
together = [] together = []

View File

@@ -620,7 +620,7 @@ class SpeechmaticsSTTService(STTService):
transcription_config.additional_vocab = [ transcription_config.additional_vocab = [
{ {
"content": e.content, "content": e.content,
"sounds_like": e.sounds_like, **({"sounds_like": e.sounds_like} if e.sounds_like else {}),
} }
for e in self._params.additional_vocab for e in self._params.additional_vocab
] ]