From 43cc188d8501a1f55d0adb5bd55ea7be0a6c4b4c Mon Sep 17 00:00:00 2001 From: Xin Wang Date: Tue, 16 Jun 2026 09:39:16 +0800 Subject: [PATCH] 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. --- backend/services/pipecat/transports.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/services/pipecat/transports.py b/backend/services/pipecat/transports.py index 6f789ec..c7e8037 100644 --- a/backend/services/pipecat/transports.py +++ b/backend/services/pipecat/transports.py @@ -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, )