Merge pull request #1901 from pipecat-ai/aleix/deepgram-sdk-4.1.0

pyproject: update deepgram-sdk to 4.1.0
This commit is contained in:
Aleix Conchillo Flaqué
2025-05-27 17:20:54 -07:00
committed by GitHub
3 changed files with 16 additions and 9 deletions

View File

@@ -89,6 +89,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Upgraded `deepgram-sdk` to 4.1.0.
- Updated `GoogleTTSService` to use Google's streaming TTS API. The default
voice also updated to `en-US-Chirp3-HD-Charon`.
@@ -145,6 +147,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Fixed a `DeegramSTTService` connection issue when the user provided their own
`LiveOptions`.
- Fixed a `DailyTransport` issue that would cause images needing resize to block
the event loop.

View File

@@ -48,7 +48,7 @@ cartesia = [ "cartesia~=2.0.3", "websockets~=13.1" ]
cerebras = []
deepseek = []
daily = [ "daily-python~=0.19.0" ]
deepgram = [ "deepgram-sdk~=3.8.0" ]
deepgram = [ "deepgram-sdk~=4.1.0" ]
elevenlabs = [ "websockets~=13.1" ]
fal = [ "fal-client~=0.5.9" ]
fireworks = []

View File

@@ -78,17 +78,19 @@ class DeepgramSTTService(STTService):
vad_events=False,
)
merged_options = default_options
merged_options = default_options.to_dict()
if live_options:
merged_options = LiveOptions(**{**default_options.to_dict(), **live_options.to_dict()})
default_model = default_options.model
merged_options.update(live_options.to_dict())
# NOTE(aleix): Fixes an in deepgram-sdk where `model` is initialized
# to the string "None" instead of the value `None`.
if "model" in merged_options and merged_options["model"] == "None":
merged_options["model"] = default_model
# 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
if "language" in merged_options and isinstance(merged_options["language"], Language):
merged_options["language"] = merged_options["language"].value
self._settings = merged_options.to_dict()
self._settings = merged_options
self._addons = addons
self._client = DeepgramClient(