feat(audio): add local barge-in prompt

This commit is contained in:
chenjintao
2026-09-22 18:06:41 +08:00
parent 8b01debe4d
commit cfdb193e75
3 changed files with 11 additions and 6 deletions
@@ -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);
}