fixing [#868] bug where deepgram client fails due to langauge
This commit is contained in:
Mark Backman
2024-12-17 12:50:57 -05:00
committed by GitHub
2 changed files with 10 additions and 0 deletions

View File

@@ -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

View File

@@ -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(