diff --git a/changelog/3386.deprecated.md b/changelog/3386.deprecated.md new file mode 100644 index 000000000..3c9c141ce --- /dev/null +++ b/changelog/3386.deprecated.md @@ -0,0 +1 @@ +- Deprecated support for the `vad_events` `LiveOptions` in `DeepgramSTTService`. Instead, use a local Silero VAD for VAD events. Additionally, deprecated `should_interrupt` which will be removed along with `vad_events` support in a future release. diff --git a/scripts/evals/run-release-evals.py b/scripts/evals/run-release-evals.py index 48491ea9b..548ade749 100644 --- a/scripts/evals/run-release-evals.py +++ b/scripts/evals/run-release-evals.py @@ -105,7 +105,6 @@ TESTS_07 = [ ("07c-interruptible-deepgram.py", EVAL_SIMPLE_MATH), ("07c-interruptible-deepgram-flux.py", EVAL_SIMPLE_MATH), ("07c-interruptible-deepgram-http.py", EVAL_SIMPLE_MATH), - ("07c-interruptible-deepgram-vad.py", EVAL_SIMPLE_MATH), ("07d-interruptible-elevenlabs.py", EVAL_SIMPLE_MATH), ("07d-interruptible-elevenlabs-http.py", EVAL_SIMPLE_MATH), ("07f-interruptible-azure.py", EVAL_SIMPLE_MATH), diff --git a/src/pipecat/services/deepgram/stt.py b/src/pipecat/services/deepgram/stt.py index eb6e12b9a..2469b25a3 100644 --- a/src/pipecat/services/deepgram/stt.py +++ b/src/pipecat/services/deepgram/stt.py @@ -48,8 +48,7 @@ class DeepgramSTTService(STTService): """Deepgram speech-to-text service. Provides real-time speech recognition using Deepgram's WebSocket API. - Supports configurable models, languages, VAD events, and various audio - processing options. + Supports configurable models, languages, and various audio processing options. """ def __init__( @@ -78,7 +77,14 @@ class DeepgramSTTService(STTService): live_options: Deepgram LiveOptions for detailed configuration. addons: Additional Deepgram features to enable. should_interrupt: Determine whether the bot should be interrupted when Deepgram VAD events are enabled and the system detects that the user is speaking. + + .. deprecated:: 0.0.99 + This parameter will be removed along with `vad_events` support. + **kwargs: Additional arguments passed to the parent STTService. + + Note: + The `vad_events` option in LiveOptions is deprecated as of version 0.0.99 and will be removed in a future version. Please use the Silero VAD instead. """ sample_rate = sample_rate or (live_options.sample_rate if live_options else None) super().__init__(sample_rate=sample_rate, **kwargs) @@ -123,6 +129,18 @@ class DeepgramSTTService(STTService): self._addons = addons self._should_interrupt = should_interrupt + if merged_options.get("vad_events"): + import warnings + + with warnings.catch_warnings(): + warnings.simplefilter("always") + warnings.warn( + "The 'vad_events' parameter is deprecated and will be removed in a future version. " + "Please use the Silero VAD instead.", + DeprecationWarning, + stacklevel=2, + ) + self._client = DeepgramClient( api_key, config=DeepgramClientOptions(