Add audio output silence configuration to prevent abrupt call termination

- Introduce a new parameter `audio_out_end_silence_secs` in the `_base_params` function to control the duration of silence added after the end frame, allowing for smoother call termination.
- Set the default value to 0 to ensure immediate hang-up after the end speech, enhancing user experience during call endings.
This commit is contained in:
Xin Wang
2026-06-16 09:39:16 +08:00
parent b22a9e1045
commit 43cc188d85

View File

@@ -29,6 +29,9 @@ def _base_params() -> dict:
return dict(
audio_in_enabled=True,
audio_out_enabled=True,
# EndFrame 后默认补 2s 静音(防止收尾被截断)。我们的挂断已等到机器人
# 说完才触发,这段静音纯属空等,置 0 让结束语播完立即挂断。
audio_out_end_silence_secs=0,
)