feat(audio): add local barge-in prompt
This commit is contained in:
@@ -34,6 +34,7 @@ const char *mp3_file[] ={
|
|||||||
"volume_up_zh.mp3",//16
|
"volume_up_zh.mp3",//16
|
||||||
"volume_down_zh.mp3",//17
|
"volume_down_zh.mp3",//17
|
||||||
"ai_active_zh.mp3",//18
|
"ai_active_zh.mp3",//18
|
||||||
|
"barge_in_cute.mp3",//19 对话打断提示音
|
||||||
};
|
};
|
||||||
|
|
||||||
//http://banban.api.talkingq.com:8080/assets/roles/banban/tts_error.mp3
|
//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};
|
char filename_buff[64]={0x00};
|
||||||
int ret = 0, cnt = 0;
|
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){
|
if(index==4||index==5||index==6||index==7||index==8){
|
||||||
continue;
|
continue;
|
||||||
@@ -208,7 +209,7 @@ void app_file_check_del(void)
|
|||||||
int index = 1;
|
int index = 1;
|
||||||
char filename_buff[64]={0x00};
|
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){
|
if(index==4||index==5||index==6||index==7||index==8){
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -889,7 +889,7 @@ int app_play_tips_file(int index)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(file_valid_check!=2){
|
if(file_valid_check!=2){
|
||||||
if(index==18){
|
if(index==18 || index==19){
|
||||||
add_file_to_play_player_queue(filename_buff, 2);
|
add_file_to_play_player_queue(filename_buff, 2);
|
||||||
}else{
|
}else{
|
||||||
add_file_to_play_player_queue(filename_buff, 0);
|
add_file_to_play_player_queue(filename_buff, 0);
|
||||||
@@ -1025,11 +1025,15 @@ int tts_play_interrupt_func(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(playback_interrupted){
|
if(playback_interrupted){
|
||||||
printf("vad_start_func0\n");
|
printf("barge_in_prompt\n");
|
||||||
/* The old player has finished consuming the cancellation state. */
|
/* The old player has finished consuming the cancellation state. */
|
||||||
tts_play_status = 0;
|
tts_play_status = 0;
|
||||||
tts_playing = 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{
|
}else{
|
||||||
app_play_tips_file(18);
|
app_play_tips_file(18);
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user