Deprecate KrispFilter
This commit is contained in:
@@ -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/),
|
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).
|
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
|
### Removed
|
||||||
|
|
||||||
|
|||||||
@@ -61,6 +61,10 @@ class KrispFilter(BaseAudioFilter):
|
|||||||
Provides real-time noise reduction for audio streams using Krisp's
|
Provides real-time noise reduction for audio streams using Krisp's
|
||||||
proprietary noise suppression algorithms. Requires a Krisp model file
|
proprietary noise suppression algorithms. Requires a Krisp model file
|
||||||
for operation.
|
for operation.
|
||||||
|
|
||||||
|
.. deprecated:: 0.0.94
|
||||||
|
The KrispFilter is deprecated and will be removed in a future version.
|
||||||
|
Use KrispVivaFilter instead.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
@@ -79,6 +83,17 @@ class KrispFilter(BaseAudioFilter):
|
|||||||
"""
|
"""
|
||||||
super().__init__()
|
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
|
# Set model path, checking environment if not specified
|
||||||
self._model_path = model_path or os.getenv("KRISP_MODEL_PATH")
|
self._model_path = model_path or os.getenv("KRISP_MODEL_PATH")
|
||||||
if not self._model_path:
|
if not self._model_path:
|
||||||
|
|||||||
Reference in New Issue
Block a user