Deprecate KrispFilter

This commit is contained in:
Mark Backman
2025-11-10 09:43:49 -05:00
parent 66c903276a
commit 8dd45af5b7
2 changed files with 21 additions and 1 deletions

View File

@@ -5,7 +5,12 @@ All notable changes to **Pipecat** will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## Not released yet
## [Unreleased]
### Deprecated
- The KrispFilter is deprecated and will be removed in a future version. Use
the KrispVivaFilter instead.
### Removed

View File

@@ -61,6 +61,10 @@ class KrispFilter(BaseAudioFilter):
Provides real-time noise reduction for audio streams using Krisp's
proprietary noise suppression algorithms. Requires a Krisp model file
for operation.
.. deprecated:: 0.0.94
The KrispFilter is deprecated and will be removed in a future version.
Use KrispVivaFilter instead.
"""
def __init__(
@@ -79,6 +83,17 @@ class KrispFilter(BaseAudioFilter):
"""
super().__init__()
import warnings
with warnings.catch_warnings():
warnings.simplefilter("always")
warnings.warn(
"KrispFilter is deprecated and will be removed in a future version. "
"Use KrispVivaFilter instead.",
DeprecationWarning,
stacklevel=2,
)
# Set model path, checking environment if not specified
self._model_path = model_path or os.getenv("KRISP_MODEL_PATH")
if not self._model_path: