Merge pull request #869 from Vaibhav159/vl_fixing_deepgram_language_bug_#868
fixing [#868] bug where deepgram client fails due to langauge
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user