Skip to content

Commit

Permalink
Merge pull request #869 from Vaibhav159/vl_fixing_deepgram_language_b…
Browse files Browse the repository at this point in the history
…ug_#868

fixing [#868] bug where deepgram client fails due to langauge
  • Loading branch information
markbackman authored Dec 17, 2024
2 parents 204a08a + f14d32d commit 9f7f74e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions src/pipecat/services/deepgram.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,13 @@ def __init__(
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(
Expand Down

0 comments on commit 9f7f74e

Please sign in to comment.