From cfdb193e75f643b8ac79195a46ae23119d33229b Mon Sep 17 00:00:00 2001 From: chenjintao Date: Tue, 22 Sep 2026 18:06:41 +0800 Subject: [PATCH] feat(audio): add local barge-in prompt --- .../threadx/interface/custom_app/http_downfile.c | 5 +++-- .../threadx/interface/custom_app/ws_talkingq.c | 10 +++++++--- ql-config/config/EG800AKCN_11LG/customer_fs.bin | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/ql-application/threadx/interface/custom_app/http_downfile.c b/ql-application/threadx/interface/custom_app/http_downfile.c index 2be48a8..d3b05c0 100644 --- a/ql-application/threadx/interface/custom_app/http_downfile.c +++ b/ql-application/threadx/interface/custom_app/http_downfile.c @@ -34,6 +34,7 @@ const char *mp3_file[] ={ "volume_up_zh.mp3",//16 "volume_down_zh.mp3",//17 "ai_active_zh.mp3",//18 + "barge_in_cute.mp3",//19 对话打断提示音 }; //http://banban.api.talkingq.com:8080/assets/roles/banban/tts_error.mp3 @@ -183,7 +184,7 @@ void app_file_check_download(void) char filename_buff[64]={0x00}; int ret = 0, cnt = 0; - for(index=1;index<19;index++){ + for(index=1;index<20;index++){ if(index==4||index==5||index==6||index==7||index==8){ continue; @@ -208,7 +209,7 @@ void app_file_check_del(void) int index = 1; char filename_buff[64]={0x00}; - for(index=1;index<19;index++){ + for(index=1;index<20;index++){ if(index==4||index==5||index==6||index==7||index==8){ continue; diff --git a/ql-application/threadx/interface/custom_app/ws_talkingq.c b/ql-application/threadx/interface/custom_app/ws_talkingq.c index 5046bab..23a948e 100644 --- a/ql-application/threadx/interface/custom_app/ws_talkingq.c +++ b/ql-application/threadx/interface/custom_app/ws_talkingq.c @@ -889,7 +889,7 @@ int app_play_tips_file(int index) } if(file_valid_check!=2){ - if(index==18){ + if(index==18 || index==19){ add_file_to_play_player_queue(filename_buff, 2); }else{ add_file_to_play_player_queue(filename_buff, 0); @@ -1025,11 +1025,15 @@ int tts_play_interrupt_func(void) } if(playback_interrupted){ - printf("vad_start_func0\n"); + printf("barge_in_prompt\n"); /* The old player has finished consuming the cancellation state. */ tts_play_status = 0; tts_playing = 0; - vad_start_func();//如果是打断就不播报 + /* Use the same local-prompt flow as ai_active_zh.mp3. Queue type 2 + * starts VAD after playback; fall back to VAD if the file is absent. */ + if(app_play_tips_file(19) != 0){ + vad_start_func(); + } }else{ app_play_tips_file(18); } diff --git a/ql-config/config/EG800AKCN_11LG/customer_fs.bin b/ql-config/config/EG800AKCN_11LG/customer_fs.bin index 78c7470..d0e6854 100644 --- a/ql-config/config/EG800AKCN_11LG/customer_fs.bin +++ b/ql-config/config/EG800AKCN_11LG/customer_fs.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:08eba5e80158dc312326f81f1ffef9fc8af648f084e2d8d1bc623b58d275c67a +oid sha256:827033779b1fddea9a360e560f379655fd9378d373dc5b278e92fc7bf94a769c size 262144