fix(voice): decouple streaming asr from media loop
This commit is contained in:
@@ -123,6 +123,10 @@ def _turn_max_ms() -> int:
|
||||
return max(_int_env("AI_VOICE_TURN_MAX_MS", 10000), _vad_frame_ms())
|
||||
|
||||
|
||||
def _vad_rms_threshold() -> int:
|
||||
return max(_int_env("AI_VOICE_VAD_RMS_THRESHOLD", 250), 1)
|
||||
|
||||
|
||||
def _media_idle_timeout_seconds() -> float:
|
||||
return max(_float_env("AI_VOICE_MEDIA_IDLE_TIMEOUT_SECONDS", 15.0), 5.0)
|
||||
|
||||
@@ -1227,6 +1231,7 @@ _MEDIA_RUNTIME = AudioSocketMediaRuntime(
|
||||
min_speech_ms=_vad_min_speech_ms(),
|
||||
trailing_silence_ms=_vad_trailing_silence_ms(),
|
||||
max_turn_ms=_turn_max_ms(),
|
||||
vad_rms_threshold=_vad_rms_threshold(),
|
||||
asr_provider=_ASR_PROVIDER,
|
||||
streaming_asr_provider=_STREAMING_ASR_PROVIDER,
|
||||
tts_provider=_TTS_PROVIDER,
|
||||
|
||||
Reference in New Issue
Block a user