remove voice gain.

This commit is contained in:
Gökmen Görgen
2026-01-19 17:41:52 +01:00
parent 5fd43faec3
commit b77f8b065f

View File

@@ -50,7 +50,6 @@ class AICFilter(BaseAudioFilter):
model_id: Optional[str] = None,
model_path: Optional[str] = None,
model_download_dir: Optional[str] = None,
voice_gain: Optional[float] = 1.0,
) -> None:
"""Initialize the AIC filter.
@@ -62,7 +61,6 @@ class AICFilter(BaseAudioFilter):
model_id is ignored and no download occurs.
model_download_dir: Directory for downloading models. Defaults to
a cache directory in user's home folder.
voice_gain: Optional linear gain applied to detected speech (0.1..4.0).
Raises:
ValueError: If neither model_id nor model_path is provided.
@@ -83,8 +81,6 @@ class AICFilter(BaseAudioFilter):
"~/.cache/pipecat/aic-models"
)
self._voice_gain = voice_gain
self._enabled = True
self._sample_rate = 0
self._aic_ready = False
@@ -203,14 +199,11 @@ class AICFilter(BaseAudioFilter):
self._processor_ctx = self._processor.get_processor_context()
self._vad_ctx = self._processor.get_vad_context()
# Apply initial parameters
try:
# Apply initial parameters
self._processor_ctx.set_parameter(
ProcessorParameter.Bypass, 0.0 if self._enabled else 1.0
)
if self._voice_gain is not None:
self._processor_ctx.set_parameter(ProcessorParameter.VoiceGain, self._voice_gain)
except ParameterFixedError as e:
logger.error(f"AIC parameter update failed: {e}")