espressif / esp-skainet

Espressif intelligent voice assistant
Other
535 stars 119 forks source link

ESP32-LyraT-Mini_V1.2开发板使用wake_word_detection 出现不能唤醒问题 (AIS-984) #64

Closed harryoceana closed 1 year ago

harryoceana commented 1 year ago

ESP32-LyraT-Mini_V1.2开发板使用wake_word_detection 编译,依照以下步骤 cp sdkconfig.defaults.esp32 sdkconfig idf.py menuconfig 修改flash size 为8M idf.py build 出现以下错误: esp/esp-skainet/components/esp-sr/src/esp_process_sdkconfig.c:884:16: error: 'ESP_MN_CHINESE' undeclared (first use in this function) if (strcmp(ESP_MN_CHINESE, multinet->get_language(model_data)) == 0) { ^~~~~~~~~~~~~~ /home/linux/esp/esp-skainet/components/esp-sr/src/esp_process_sdkconfig.c:884:16: note: each undeclared identifier is reported only once for each function it appears in /home/linux/esp/esp-skainet/components/esp-sr/src/esp_process_sdkconfig.c:884:42: error: 'esp_mn_iface_t' {aka 'const struct <anonymous>'} has no member named 'get_language'; did you mean 'get_samp_rate'? if (strcmp(ESP_MN_CHINESE, multinet->get_language(model_data)) == 0) { 添加#include "../include/esp32/esp_mn_models.h"并修改get_languageget_samp_rate后编译通过,下载上电后打印信息不全

`0x400817ec: call_start_cpu1 at /home/linux/esp/esp-skainet/esp-idf/components/esp_system/port/cpu_start.c:156

I (0) cpu_start: App cpu up. I (863) spiram: SPI SRAM memory test OK I (871) cpu_start: Pro cpu start user code I (871) cpu_start: cpu freq: 240000000 I (871) cpu_start: Application information: I (874) cpu_start: Project name: wake_word_detection I (880) cpu_start: App version: v0.3.0-129-g7955e63-dirty I (886) cpu_start: Compile time: Sep 19 2022 15:02:05 I (892) cpu_start: ELF file SHA256: 94dedc0de1606d95... I (898) cpu_start: ESP-IDF: v4.4-beta1-2-gdf0929009a I (905) heap_init: Initializing. RAM available for dynamic allocation: I (912) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM I (918) heap_init: At 3FFB4A48 len 0002B5B8 (173 KiB): DRAM I (924) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM I (930) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM I (937) heap_init: At 40095968 len 0000A698 (41 KiB): IRAM I (943) spiram: Adding pool of 4095K of external SPI memory to heap allocator I (951) spi_flash: detected chip: generic I (956) spi_flash: flash io: qio I (960) cpu_start: Starting scheduler on PRO CPU. I (0) cpu_start: Starting scheduler on APP CPU. I (970) spiram: Reserving pool of 32K of internal memory for DMA/internal allocations I (980) I2S: DMA Malloc info, datalen=blocksize=1280, dma_buf_count=6 I (990) I2S: I2S1, MCLK output by GPIO0 I (990) I2S: DMA Malloc info, datalen=blocksize=320, dma_buf_count=6 I (1000) I2S: I2S0, MCLK output by GPIO0 W (1000) board: Codec not detected I (1010) gpio: GPIO[12]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 Load: wn5_nihaoxiaozhi I (1020) AFE_SR: afe interface for speech recognition

I (1020) AFE_SR: AFE version: SR_V220727

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

I (1040) AFE_SR: aec_init: 1, se_init: 1, vad_init: 1

I (1040) AFE_SR: wakenet_init: 1

Deprecated Quantized wakenet5: wakeNet5_v1_nihaoxiaozhi_6_0.983_0.95, mode:0 (Aug 17 2022 20:20:31) Please switch to ESP32-S3 and wakenet9 ! I (1200) AFE_SR: wake num: 1, mode: 1, (Aug 17 2022 20:20:31)

------------detect start------------ ` 唤醒无反应,板子上两个提示LED灯常亮

feizi commented 1 year ago

现在esp-skainet针对ESP32默认只支持 ESP32-Korvo 开发板。
该开发板是双麦,你使用的应该是单麦的开发板,需要自己修改一下AFE的配置

harryoceana commented 1 year ago

AFE_SR: Initial auido front-end, total channel: 2, mic num: 1, ref num: 1 1663578163970 esp32 默认的配置就是单麦

feizi commented 1 year ago

忘记了,ESP32 默认配置都改成单麦了。 我刚才试了一下, wakeNet5_v1_nihaoxiaozhi 可以唤醒。

  1. 更新一下esp-sr master分支,可以去掉找不到 get_language function的问题
  2. 关于不识别的问题,需要看一下 麦克风输出 的音频是否正常