diff --git a/CHANGELOG.md b/CHANGELOG.md index 53a2871aa..78e069fc7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,6 +38,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 only be pushed downstream after the audio generated from `TTSSpeakFrame` has been spoken. +- Fixed a [bug](https://github.com/pipecat-ai/pipecat/issues/868) in `DeepgramSTTService` that was causing Language to be passed + as python object instead of a string, causing connection to fail. + ## [0.0.51] - 2024-12-16 ### Fixed diff --git a/src/pipecat/services/deepgram.py b/src/pipecat/services/deepgram.py index 6578f2873..8d3def5be 100644 --- a/src/pipecat/services/deepgram.py +++ b/src/pipecat/services/deepgram.py @@ -138,6 +138,13 @@ class DeepgramSTTService(STTService): merged_options = default_options if live_options: merged_options = LiveOptions(**{**default_options.to_dict(), **live_options.to_dict()}) + + # deepgram connection requires language to be a string + if isinstance(merged_options.language, Language) and hasattr( + merged_options.language, "value" + ): + merged_options.language = merged_options.language.value + self._settings = merged_options.to_dict() self._client = DeepgramClient(