espressif / esp-box

The ESP-BOX is a new generation AIoT development platform released by Espressif Systems.
Apache License 2.0
709 stars 172 forks source link

When running esp-sr, a statement is stuck(esp-sr离线语音识别卡死问题) #111

Closed worth-moon closed 6 months ago

worth-moon commented 7 months ago

Dear Espressif, I encountered a situation where the offline voice recognition stuck and did not trigger the watchdog restart when I modified the following routine

https://github.com/espressif/esp-box/tree/master/examples/watering_demo

The development environment is as follows

  1. Hardware: ESP32-S3-BOX-Lite
  2. ESP-IDF: esp-idf- v5.1.1
  3. Programming Environment: vscode

app_main

void app_main(void)
{
    bsp_board_init();
    bsp_display_start();
    app_sr_start();
}

All logs are as follows

PS E:\ESP-IDF_Project\new_10.27\sr_deve\desktop_station\applications\independent_sr> set IDF_PATH=E:/Espressif/frameworks/esp-idf-v5.1.1/
PS E:\ESP-IDF_Project\new_10.27\sr_deve\desktop_station\applications\independent_sr> E:/Espressif/python_env/idf5.1_py3.11_env/Scripts/python.exe E:\Espressif\frameworks\esp-idf-v5.1.1\tools\idf_monitor.py -p COM11 -b 115200 --toolchain-prefix xtensa-esp32s3-elf- --target esp32s3 e:\ESP-IDF_Project\new_10.27\sr_deve\desktop_station\applications\independent_sr\build\independent_sr.elf
--- WARNING: GDB cannot open serial ports accessed as COMx
--- Using \\.\COM11 instead...
--- idf_monitor on \\.\COM11 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x15 (USB_UART_CHIP_RESET),boot:0x2 (DOWNLOAD(USB/UART0))
Saved PC:0x40041a79
0x40041a79: ets_delay_us in ROM

waiting for download
None
Waiting for the device to reconnect.
I (280) esp_image: segment 3: paddr=000ea0e0 vaddr=3fc9f6I (921) button: IoT Button Version: 2.5.6
I (921) adc button: ADC1 has been initialized
I (921) adc button: calibration scheme version is Curve Fitting
I (921) adc button: Calibration Success
I (921) button: IoT Button Version: 2.5.6
I (921) button: IoT Button Version: 2.5.6
I (921) MODEL_LOADER: The storage free size is 23744 KB
I (921) MODEL_LOADER: The partition size is 4300 KB
I (921) MODEL_LOADER: Successfully map model partition
I (921) app_sr: load wakenet:wn9_hilexin
I (921) AFE_SR: afe interface for speech recognition

I (921) AFE_SR: AFE version: SR_V220727

I (921) AFE_SR: Initial auido front-end, total channel: 3, mic num: 2, ref num: 1

I (921) AFE_SR: aec_init: 0, se_init: 1, vad_init: 1

I (921) AFE_SR: wakenet_init: 1

MC Quantized wakenet9: wakenet9_v1h24_hilexin_3_0.608_0.615, tigger:v3, mode:2, p:0, (Jul  7 2023 11:10:53)
I (1131) AFE_SR: wake num: 3, mode: 0, (Jul  7 2023 11:10:53)

Quantized8 Multinet5: MN5Q8_v2_chinese_8_0.9_0.90, beam search:v2, (Jul  7 2023 11:37:23)
I (1341) app_sr: load multinet:mn5q8_cn
I (1341) MN_COMMAND: ---------------------SPEECH COMMANDS---------------------
I (1341) MN_COMMAND: Command ID5, phrase ID0: ce shi zhi ling
I (1341) MN_COMMAND: Command ID0, phrase ID1: da kai kong tiao
I (1341) MN_COMMAND: Command ID1, phrase ID2: guan bi kong tiao
I (1341) MN_COMMAND: Command ID2, phrase ID3: zhi leng mo shi
I (1341) MN_COMMAND: Command ID3, phrase ID4: shang xia mo shi
I (1341) MN_COMMAND: ---------------------------------------------------------

phrase id:0, command id:5, str:c e sh i zh i l ing
phrase id:1, command id:0, str:d a k ai k ong ti ao
phrase id:2, command id:1, str:gu an b i k ong ti ao
phrase id:3, command id:2, str:zh i l eng m o sh i
phrase id:4, command id:3, str:sh ang xi a m o sh i
I (1341) app_sr: ------------detect start------------

E (4341) app_sr: fetch error!
E (7341) app_sr: fetch error!
E (10341) app_sr: fetch error!
E (13341) app_sr: fetch error!
E (16341) app_sr: fetch error!
E (19341) app_sr: fetch error!
E (22341) app_sr: fetch error!
E (25341) app_sr: fetch error!
E (28341) app_sr: fetch error!
I (31341) app_sr: audio_chunksize=1024, feed_channel=3
I (31341) main_task: Returned from app_main()
I (56371) app_sr: Wakeword detected
I (56371) sr_handler: cmd:0, wakemode:1,state:0
I (56371) sr_handler: wake up!
I (56561) app_sr: Channel verified
E (58631) app_sr: esp_mn_state_detected!
I (58631) app_sr: TOP 1, command_id: 0, phrase_id: 1, prob: 0.627797
I (58631) app_sr: Deteted command : 0
I (58631) sr_handler: cmd:0, wakemode:0,state:1
I (58631) sr_handler: detect is OK!
E (60741) app_sr: esp_mn_state_detected!
I (60741) app_sr: TOP 1, command_id: 1, phrase_id: 2, prob: 0.275358
I (60741) app_sr: Deteted command : 1
I (60741) sr_handler: cmd:1, wakemode:0,state:1
I (60741) sr_handler: detect is OK!
E (63361) app_sr: esp_mn_state_detected!
I (63361) app_sr: TOP 1, command_id: 3, phrase_id: 4, prob: 0.634382
I (63361) app_sr: Deteted command : 3
I (63361) sr_handler: cmd:3, wakemode:0,state:1
I (63361) sr_handler: detect is OK!
E (65471) app_sr: esp_mn_state_detected!
I (65471) app_sr: TOP 1, command_id: 2, phrase_id: 3, prob: 0.388715
I (65471) app_sr: Deteted command : 2
I (65471) sr_handler: cmd:2, wakemode:0,state:1
I (65471) sr_handler: detect is OK!
E (67591) app_sr: esp_mn_state_detected!
  1. After the download is complete, the logs stop printing after pressing the reset key of ESP32-S3-box-lite in "Waiting for Download".
  2. Several of the "E (4307) app_sr: fetch error!" Modifications made from the following link, and the questions that arose before the change were mentioned by the person who asked the question

https://github.com/espressif/esp-sr/issues/60

  1. The corresponding task creation code is as follows:

    BaseType_t ret_val = xTaskCreatePinnedToCore(audio_detect_task, "Detect Task", 6 * 1024, afe_data, 5, NULL, 1);
    ESP_RETURN_ON_FALSE(pdPASS == ret_val, ESP_FAIL, tag,  "Failed create audio detect task");
    vTaskDelay(1000);

    ret_val = xTaskCreatePinnedToCore(audio_feed_task, "Feed Task", 4 * 1024, afe_data, 5, NULL, 0);
    ESP_RETURN_ON_FALSE(pdPASS == ret_val, ESP_FAIL, tag,  "Failed create audio feed task");

    ret_val = xTaskCreatePinnedToCore(sr_handler_task, "SR Handler Task", 4 * 1024, g_result_que, 1, NULL, 0);
    ESP_RETURN_ON_FALSE(pdPASS == ret_val, ESP_FAIL, tag,  "Failed create audio handler task");
  1. Where the program is stuck

The log reads "app_sr: esp_mn_state_detected!" and "app_sr: TOP 1, command_id: 3, phrase_id: 4, prob: 0.634382" appear in the following statement 70 and 73 lines of code (existing in Detect Task), so that the program is stuck esp_mn_results_t *mn_result = multinet->get_results(model_data);


static void audio_detect_task(void *pvParam)
{
    bool detect_flag = false;   

    esp_afe_sr_data_t *afe_data = (esp_afe_sr_data_t *) pvParam;   

    int afe_chunksize = afe_handle->get_fetch_chunksize(afe_data);        
    int mu_chunksize = multinet->get_samp_chunksize(model_data);  
    assert(mu_chunksize == afe_chunksize); 
    ESP_LOGI(tag, "------------detect start------------\n");  
    while (true) 
    {
        if (flag_delete == 1)  
        {  
            break;  
        }  

        afe_fetch_result_t *res = afe_handle->fetch(afe_data);
        if (!res || res->ret_value == ESP_FAIL) 
        {
            ESP_LOGE(tag, "fetch error!");
            continue;
        }

        if (res->wakeup_state == WAKENET_DETECTED)  
        {

            ESP_LOGI(tag, LOG_BOLD(LOG_COLOR_GREEN) "Wakeword detected");
            sr_result_t result = 
            {
                .wakenet_mode = WAKENET_DETECTED,
                .state = ESP_MN_STATE_DETECTING,
                .command_id = 0,
            };
            xQueueSend(g_result_que, &result, 10);
        } 
        else if (res->wakeup_state == WAKENET_CHANNEL_VERIFIED) 
        {
            ESP_LOGI(tag, LOG_BOLD(LOG_COLOR_GREEN) "Channel verified");
            detect_flag = true;
            afe_handle->disable_wakenet(afe_data);
        }

        if (true == detect_flag) 
        {
            esp_mn_state_t mn_state = ESP_MN_STATE_DETECTING;
            mn_state = multinet->detect(model_data, res->data);
            if (ESP_MN_STATE_DETECTING == mn_state) 
            {
                continue;
            }

            if (ESP_MN_STATE_TIMEOUT == mn_state)   
            {
                ESP_LOGW(tag, "Time out");
                sr_result_t result = 
                {
                    .wakenet_mode = WAKENET_NO_DETECT,
                    .state = mn_state,
                    .command_id = 0,
                };
                xQueueSend(g_result_que, &result, 10);
                afe_handle->enable_wakenet(afe_data);
                detect_flag = false;
                continue;
            }

            if (ESP_MN_STATE_DETECTED == mn_state)  
            {
                ESP_LOGE(tag, "esp_mn_state_detected!");

                esp_mn_results_t *mn_result = multinet->get_results(model_data);    
                ESP_LOGI(tag, "TOP %d, command_id: %d, phrase_id: %d, prob: %f", 1, mn_result->command_id[0], mn_result->phrase_id[0], mn_result->prob[0]);

                int sr_command_id = mn_result->command_id[0];               
                ESP_LOGI(tag, "Deteted command : %d", sr_command_id);   
                sr_result_t result = 
                {
                    .wakenet_mode = WAKENET_NO_DETECT,
                    .state = mn_state,
                    .command_id = sr_command_id,
                };
                xQueueSend(g_result_que, &result, 10);
                continue;
            }
            ESP_LOGE(tag, "Exception unhandled");
        }
    }

    afe_handle->destroy(afe_data);
    vTaskDelete(NULL);
}

After testing, there is almost no upper limit on the program jamming time (the author tested, there is still no new log output for ten minutes, and there is no hardware jamming problem)

  1. There are two things to keep in mind when adding commands

struct test_mn { int id; char phoneme;
struct sr_command_t
pnext; };


After testing, after adding instructions, the program is stuck only a chance to appear, please try to add five statements by yourself, only one statement is stuck, when the behavior appears, no matter what other changes the program makes, the stuck will always appear (when the voice command is spoken, the modification of the voice command is invalid)
Hope to get a reply, thanks!

### The above text is translated by Baidu, if it affects reading, please see the original text

亲爱的乐鑫,你好,我修改以下例程时遇见离线语音识别卡死缺又没有触发看门狗重启的情况

> https://github.com/espressif/esp-box/tree/master/examples/watering_demo

### 开发环境如下
1. 硬件:ESP32-S3-BOX-Lite
2. ESP-IDF: esp-idf- v5.1.1
3. 编程环境: vscode

### main函数如下

void app_main(void) { bsp_board_init(); bsp_display_start(); app_sr_start(); }


### 所有日志如下

PS E:\ESP-IDF_Project\new_10.27\sr_deve\desktop_station\applications\independent_sr> set IDF_PATH=E:/Espressif/frameworks/esp-idf-v5.1.1/ PS E:\ESP-IDF_Project\new_10.27\sr_deve\desktop_station\applications\independent_sr> E:/Espressif/python_env/idf5.1_py3.11_env/Scripts/python.exe E:\Espressif\frameworks\esp-idf-v5.1.1\tools\idf_monitor.py -p COM11 -b 115200 --toolchain-prefix xtensa-esp32s3-elf- --target esp32s3 e:\ESP-IDF_Project\new_10.27\sr_deve\desktop_station\applications\independent_sr\build\independent_sr.elf --- WARNING: GDB cannot open serial ports accessed as COMx --- Using \.\COM11 instead... --- idf_monitor on \.\COM11 115200 --- --- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H --- ESP-ROM:esp32s3-20210327 Build:Mar 27 2021 rst:0x15 (USB_UART_CHIP_RESET),boot:0x2 (DOWNLOAD(USB/UART0)) Saved PC:0x40041a79 0x40041a79: ets_delay_us in ROM

waiting for download None Waiting for the device to reconnect. I (280) esp_image: segment 3: paddr=000ea0e0 vaddr=3fc9f6I (921) button: IoT Button Version: 2.5.6 I (921) adc button: ADC1 has been initialized I (921) adc button: calibration scheme version is Curve Fitting I (921) adc button: Calibration Success I (921) button: IoT Button Version: 2.5.6 I (921) button: IoT Button Version: 2.5.6 I (921) MODEL_LOADER: The storage free size is 23744 KB I (921) MODEL_LOADER: The partition size is 4300 KB I (921) MODEL_LOADER: Successfully map model partition I (921) app_sr: load wakenet:wn9_hilexin I (921) AFE_SR: afe interface for speech recognition

I (921) AFE_SR: AFE version: SR_V220727

I (921) AFE_SR: Initial auido front-end, total channel: 3, mic num: 2, ref num: 1

I (921) AFE_SR: aec_init: 0, se_init: 1, vad_init: 1

I (921) AFE_SR: wakenet_init: 1

MC Quantized wakenet9: wakenet9_v1h24_hilexin_3_0.608_0.615, tigger:v3, mode:2, p:0, (Jul 7 2023 11:10:53) I (1131) AFE_SR: wake num: 3, mode: 0, (Jul 7 2023 11:10:53)

Quantized8 Multinet5: MN5Q8_v2_chinese_8_0.9_0.90, beam search:v2, (Jul 7 2023 11:37:23) I (1341) app_sr: load multinet:mn5q8_cn I (1341) MN_COMMAND: ---------------------SPEECH COMMANDS--------------------- I (1341) MN_COMMAND: Command ID5, phrase ID0: ce shi zhi ling I (1341) MN_COMMAND: Command ID0, phrase ID1: da kai kong tiao I (1341) MN_COMMAND: Command ID1, phrase ID2: guan bi kong tiao I (1341) MN_COMMAND: Command ID2, phrase ID3: zhi leng mo shi I (1341) MN_COMMAND: Command ID3, phrase ID4: shang xia mo shi I (1341) MN_COMMAND: ---------------------------------------------------------

phrase id:0, command id:5, str:c e sh i zh i l ing phrase id:1, command id:0, str:d a k ai k ong ti ao phrase id:2, command id:1, str:gu an b i k ong ti ao phrase id:3, command id:2, str:zh i l eng m o sh i phrase id:4, command id:3, str:sh ang xi a m o sh i I (1341) app_sr: ------------detect start------------

E (4341) app_sr: fetch error! E (7341) app_sr: fetch error! E (10341) app_sr: fetch error! E (13341) app_sr: fetch error! E (16341) app_sr: fetch error! E (19341) app_sr: fetch error! E (22341) app_sr: fetch error! E (25341) app_sr: fetch error! E (28341) app_sr: fetch error! I (31341) app_sr: audio_chunksize=1024, feed_channel=3 I (31341) main_task: Returned from app_main() I (56371) app_sr: Wakeword detected I (56371) sr_handler: cmd:0, wakemode:1,state:0 I (56371) sr_handler: wake up! I (56561) app_sr: Channel verified E (58631) app_sr: esp_mn_state_detected! I (58631) app_sr: TOP 1, command_id: 0, phrase_id: 1, prob: 0.627797 I (58631) app_sr: Deteted command : 0 I (58631) sr_handler: cmd:0, wakemode:0,state:1 I (58631) sr_handler: detect is OK! E (60741) app_sr: esp_mn_state_detected! I (60741) app_sr: TOP 1, command_id: 1, phrase_id: 2, prob: 0.275358 I (60741) app_sr: Deteted command : 1 I (60741) sr_handler: cmd:1, wakemode:0,state:1 I (60741) sr_handler: detect is OK! E (63361) app_sr: esp_mn_state_detected! I (63361) app_sr: TOP 1, command_id: 3, phrase_id: 4, prob: 0.634382 I (63361) app_sr: Deteted command : 3 I (63361) sr_handler: cmd:3, wakemode:0,state:1 I (63361) sr_handler: detect is OK! E (65471) app_sr: esp_mn_state_detected! I (65471) app_sr: TOP 1, command_id: 2, phrase_id: 3, prob: 0.388715 I (65471) app_sr: Deteted command : 2 I (65471) sr_handler: cmd:2, wakemode:0,state:1 I (65471) sr_handler: detect is OK! E (67591) app_sr: esp_mn_state_detected!


1.  下载完成后,日志停止在“waiting for download”按下esp32-s3-box-lite的reset键后打印后续日志
2.  其中的几个“E (4307) app_sr: fetch error!”源于以下链接而做的修改,修改前出现的问题如链接中提问者提到的一样

> https://github.com/espressif/esp-sr/issues/60

3. 对应的任务创建代码如下
BaseType_t ret_val = xTaskCreatePinnedToCore(audio_detect_task, "Detect Task", 6 * 1024, afe_data, 5, NULL, 1);
ESP_RETURN_ON_FALSE(pdPASS == ret_val, ESP_FAIL, tag,  "Failed create audio detect task");
vTaskDelay(1000);

ret_val = xTaskCreatePinnedToCore(audio_feed_task, "Feed Task", 4 * 1024, afe_data, 5, NULL, 0);
ESP_RETURN_ON_FALSE(pdPASS == ret_val, ESP_FAIL, tag,  "Failed create audio feed task");

ret_val = xTaskCreatePinnedToCore(sr_handler_task, "SR Handler Task", 4 * 1024, g_result_que, 1, NULL, 0);
ESP_RETURN_ON_FALSE(pdPASS == ret_val, ESP_FAIL, tag,  "Failed create audio handler task");

4. 程序卡死之处

日志内容“app_sr: esp_mn_state_detected!”和“app_sr: TOP 1, command_id: 3, phrase_id: 4, prob: 0.634382”出现在如下语句70和73行代码(存在于Detect Task),如此可判断程序卡死在
`esp_mn_results_t *mn_result = multinet->get_results(model_data); `

static void audio_detect_task(void *pvParam) { bool detect_flag = false; //唤醒标志位

esp_afe_sr_data_t *afe_data = (esp_afe_sr_data_t *) pvParam;   

int afe_chunksize = afe_handle->get_fetch_chunksize(afe_data);      // 为检测分配缓冲区,获取音频块的尺寸。  
int mu_chunksize = multinet->get_samp_chunksize(model_data);  
assert(mu_chunksize == afe_chunksize);  // 断言验证mu_chunksize是否等于afe_chunksize。  
ESP_LOGI(tag, "------------detect start------------\n");    // 打印日志信息,标记音频检测开始。
while (true) 
{
    if (flag_delete == 1)  
    {  
        break;  
    }  

    afe_fetch_result_t *res = afe_handle->fetch(afe_data);
    if (!res || res->ret_value == ESP_FAIL) 
    {
        ESP_LOGE(tag, "fetch error!");
        continue;
    }

    if (res->wakeup_state == WAKENET_DETECTED)  //唤醒 
    {
        /*=== 发送识别结果到队列 ===*/
        ESP_LOGI(tag, LOG_BOLD(LOG_COLOR_GREEN) "Wakeword detected");
        sr_result_t result = 
        {
            .wakenet_mode = WAKENET_DETECTED,
            .state = ESP_MN_STATE_DETECTING,
            .command_id = 0,
        };
        xQueueSend(g_result_que, &result, 10);
    } 
    else if (res->wakeup_state == WAKENET_CHANNEL_VERIFIED) //使能唤醒词,开启语音指令识别
    {
        ESP_LOGI(tag, LOG_BOLD(LOG_COLOR_GREEN) "Channel verified");
        detect_flag = true;
        afe_handle->disable_wakenet(afe_data);
    }

    if (true == detect_flag) 
    {
        esp_mn_state_t mn_state = ESP_MN_STATE_DETECTING;
        mn_state = multinet->detect(model_data, res->data);
        if (ESP_MN_STATE_DETECTING == mn_state) 
        {
            continue;
        }

        if (ESP_MN_STATE_TIMEOUT == mn_state)   //超时 
        {
            ESP_LOGW(tag, "Time out");
            sr_result_t result = 
            {
                .wakenet_mode = WAKENET_NO_DETECT,
                .state = mn_state,
                .command_id = 0,
            };
            xQueueSend(g_result_que, &result, 10);
            afe_handle->enable_wakenet(afe_data);
            detect_flag = false;
            continue;
        }

        if (ESP_MN_STATE_DETECTED == mn_state)  //开始识别 
        {
            ESP_LOGE(tag, "esp_mn_state_detected!");

            esp_mn_results_t *mn_result = multinet->get_results(model_data);    //将外界音频数据与语音模型进行匹配
            ESP_LOGI(tag, "TOP %d, command_id: %d, phrase_id: %d, prob: %f", 1, mn_result->command_id[0], mn_result->phrase_id[0], mn_result->prob[0]);

            int sr_command_id = mn_result->command_id[0];               
            ESP_LOGI(tag, "Deteted command : %d", sr_command_id);   //可能性最高的指令
            sr_result_t result = 
            {
                .wakenet_mode = WAKENET_NO_DETECT,
                .state = mn_state,
                .command_id = sr_command_id,
            };
            xQueueSend(g_result_que, &result, 10);
            continue;
        }
        ESP_LOGE(tag, "Exception unhandled");
    }
}

/*=== 清除配置并删除任务。可能是取消对AFE_SR模块的引用或者释放相关的资源 ===*/
ESP_LOGE(tag, "任务已删除");
afe_handle->destroy(afe_data);
vTaskDelete(NULL);

}


经测试,程序卡死时间几乎没有上限(笔者测试,十分钟仍无新的日志输出,没有硬件卡死问题)

5. 添加指令时需要注意两点

- 调用以下函数添加语音指令到模型的时候,需要注意,两个参数必须存储在一个结构体中,并为结构体分配动态内存
esp_err_t esp_mn_commands_add(int command_id, char *string)
- 结构体需具备链表的指针域,即有一个成员变量用于连接链表中的其它元素
参考结构体

struct test_mn { int id; //语音识别指令id号,不可重复
char phoneme; //语音指令的拼音字符串 struct sr_command_t pnext; //链表指针 };



经测试,添加指令后,程序卡死仅是有几率出现,请多加尝试笔者自行添加五个语句,只有一个语句卡死,当出现该行为起,后续无论程序做出其它任何改变,卡死总会出现(当说出该语音指令后,修改语音指令无效)
希望得到回复,感谢!
espressif2022 commented 7 months ago

请多加尝试笔者自行添加五个语句,只有一个语句卡死,当出现该行为起,后续无论程序做出其它任何改变,卡死总会出现(当说出该语音指令后,修改语音指令无效)

是否是固定某个命令卡死,另外,使用的 SR 版本是?

worth-moon commented 7 months ago

请多加尝试笔者自行添加五个语句,只有一个语句卡死,当出现该行为起,后续无论程序做出其它任何改变,卡死总会出现(当说出该语音指令后,修改语音指令无效)

是否是固定某个命令卡死,另外,使用的 SR 版本是?

不是固定命令,修改命令词,同样会卡死,sr的版本是1.3.3.

espressif2022 commented 7 months ago

请多加尝试笔者自行添加五个语句,只有一个语句卡死,当出现该行为起,后续无论程序做出其它任何改变,卡死总会出现(当说出该语音指令后,修改语音指令无效)

是否是固定某个命令卡死,另外,使用的 SR 版本是?

不是固定命令,修改命令词,同样会卡死,sr的版本是1.3.3.

更先更新到 1.4.2 版本看下,1.3.3 可能是有问题的,中文模型那 另外,你是消息识别的消息那,有没有对端的处理?

worth-moon commented 7 months ago

请多加尝试笔者自行添加五个语句,只有一个语句卡死,当出现该行为起,后续无论程序做出其它任何改变,卡死总会出现(当说出该语音指令后,修改语音指令无效)

是否是固定某个命令卡死,另外,使用的 SR 版本是?

不是固定命令,修改命令词,同样会卡死,sr的版本是1.3.3.

更先更新到 1.4.2 版本看下,1.3.3 可能是有问题的,中文模型那 另外,你是消息识别的消息那,有没有对端的处理?

为排查干扰,后续处理都注释了,我先更新到1.4.2试试吧

worth-moon commented 7 months ago

请多加尝试笔者自行添加五个语句,只有一个语句卡死,当出现该行为起,后续无论程序做出其它任何改变,卡死总会出现(当说出该语音指令后,修改语音指令无效)

是否是固定某个命令卡死,另外,使用的 SR 版本是?

不是固定命令,修改命令词,同样会卡死,sr的版本是1.3.3.

更先更新到 1.4.2 版本看下,1.3.3 可能是有问题的,中文模型那 另外,你是消息识别的消息那,有没有对端的处理?

微信图片_20231113174844 如上图,esp-sr更新后,没有比较明显的改动,另外我使用的语音识别模型是mn5q8_cn

worth-moon commented 7 months ago

请多加尝试笔者自行添加五个语句,只有一个语句卡死,当出现该行为起,后续无论程序做出其它任何改变,卡死总会出现(当说出该语音指令后,修改语音指令无效)

是否是固定某个命令卡死,另外,使用的 SR 版本是?

不是固定命令,修改命令词,同样会卡死,sr的版本是1.3.3.

更先更新到 1.4.2 版本看下,1.3.3 可能是有问题的,中文模型那 另外,你是消息识别的消息那,有没有对端的处理?

微信图片_20231113174844 如上图,esp-sr更新后,没有比较明显的改动,另外我使用的语音识别模型是mn5q8_cn 发现esp-sr最新版本到了1.5.0,刚发现似乎这个问题已经解决了,待我多加测试,晚些再回复

espressif2022 commented 7 months ago

请多加尝试笔者自行添加五个语句,只有一个语句卡死,当出现该行为起,后续无论程序做出其它任何改变,卡死总会出现(当说出该语音指令后,修改语音指令无效)

是否是固定某个命令卡死,另外,使用的 SR 版本是?

不是固定命令,修改命令词,同样会卡死,sr的版本是1.3.3.

更先更新到 1.4.2 版本看下,1.3.3 可能是有问题的,中文模型那 另外,你是消息识别的消息那,有没有对端的处理?

微信图片_20231113174844 如上图,esp-sr更新后,没有比较明显的改动,另外我使用的语音识别模型是mn5q8_cn

模型应该是 OK 的,之前中文 5.8 版本有问题,已经修复了。如果方便,可以提供下这个最小 demo,我们验证下。

ESP-Mars commented 6 months ago

Temporarily closed due to the extended period of time with no response. Should you have additional questions or concerns, don't hesitate to reopen the issue.