Skip to content

ESP32-S3-BOX-Lite 运行chatgpt demo 时偶尔出现无法唤醒的问题 (AEGHB-574) #135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Wvirgil123 opened this issue Mar 2, 2024 · 5 comments

Comments

@Wvirgil123
Copy link

环境:
1、IDF: ESP-IDF v5.1
2、esp-box commit: ee2160d
3、 设备 ESP32-S3-BOX-Lite
4、WIFI 连接正常

问题:
每次上电有一定概率出现无法唤醒的情况,按键唤醒之后,也会一直卡在listening的状态; 设备重新上电之后, 有概率可以正常唤醒, 只要能唤醒之后, 后面都是正常的。

(1) 测试
当出现异常时, 获取wakeup_state和vad_state状态。当说唤醒词时, wakeup_state 也一直也为0; 当通过按键唤醒时, 周围没有说话时,vad_state一直为1,导致无法发出超时事件.

image

(2) 异常时启动log( 正常和异常唤醒时,日志无差别,启动阶段都会报出“AFE Fetch Fail”)

I (27) boot: ESP-IDF v5.1 2nd stage bootloader
I (27) boot: compile time Mar  2 2024 09:40:50
I (27) boot: Multicore bootloader
I (30) boot: chip revision: v0.1
I (34) qio_mode: Enabling default flash chip QIO
I (39) boot.esp32s3: Boot SPI Speed : 80MHz
I (44) boot.esp32s3: SPI Mode       : QIO
I (48) boot.esp32s3: SPI Flash Size : 16MB
I (53) boot: Enabling RNG early entropy source...
I (59) boot: Partition Table:
I (62) boot: ## Label            Usage          Type ST Offset   Length
I (69) boot:  0 nvs              WiFi data        01 02 00009000 00004000
I (77) boot:  1 otadata          OTA data         01 00 0000d000 00002000
I (84) boot:  2 phy_init         RF data          01 01 0000f000 00001000
I (92) boot:  3 factory          factory app      00 00 00010000 00600000
I (99) boot:  4 ota_0            OTA app          00 10 00700000 00200000
I (107) boot:  5 storage          Unknown data     01 82 00900000 00200000
I (114) boot:  6 model            Unknown data     01 82 00b00000 003e8000
I (122) boot: End of partition table
I (126) boot: Defaulting to factory image
I (131) esp_image: segment 0: paddr=00010020 vaddr=3c100020 size=21a998h (2206104) map
I (474) esp_image: segment 1: paddr=0022a9c0 vaddr=3fc9b800 size=05658h ( 22104) load
I (478) esp_image: segment 2: paddr=00230020 vaddr=42000020 size=f5984h (1005956) map
I (632) esp_image: segment 3: paddr=003259ac vaddr=3fca0e58 size=01998h (  6552) load
I (634) esp_image: segment 4: paddr=0032734c vaddr=40374000 size=17750h ( 96080) load
I (667) boot: Loaded app from partition at offset 0x10000
I (667) boot: Disabling RNG early entropy source...
I (678) cpu_start: Multicore app
I (678) octal_psram: vendor id    : 0x0d (AP)
I (679) octal_psram: dev id       : 0x02 (generation 3)
I (682) octal_psram: density      : 0x03 (64 Mbit)
I (687) octal_psram: good-die     : 0x01 (Pass)
I (692) octal_psram: Latency      : 0x01 (Fixed)
I (698) octal_psram: VCC          : 0x01 (3V)
I (703) octal_psram: SRF          : 0x01 (Fast Refresh)
I (709) octal_psram: BurstType    : 0x01 (Hybrid Wrap)
I (714) octal_psram: BurstLen     : 0x01 (32 Byte)
I (720) octal_psram: Readlatency  : 0x02 (10 cycles@Fixed)
I (726) octal_psram: DriveStrength: 0x00 (1/1)
I (732) esp_psram: Found 8MB PSRAM device
I (736) esp_psram: Speed: 80MHz
I (809) mmu_psram: Instructions copied and mapped to SPIRAM
I (810) cpu_start: Pro cpu up.
I (810) cpu_start: Starting app cpu, entry point is 0x40375870
0x40375870: call_start_cpu1 at /esp-idf/components/esp_system/port/cpu_start.c:154

I (0) cpu_start: App cpu up.
I (1061) esp_psram: SPI SRAM memory test OK
I (1071) cpu_start: Pro cpu start user code
I (1071) cpu_start: cpu freq: 240000000 Hz
I (1071) cpu_start: Application information:
I (1074) cpu_start: Project name:     chatgpt_demo
I (1079) cpu_start: App version:      v0.5.0-55-gee2160d-dirty
I (1086) cpu_start: Compile time:     Mar  2 2024 09:40:39
I (1092) cpu_start: ELF file SHA256:  183b88d532d1d3c6...
I (1098) cpu_start: ESP-IDF:          v5.1
I (1103) cpu_start: Min chip rev:     v0.0
I (1108) cpu_start: Max chip rev:     v0.99 
I (1113) cpu_start: Chip rev:         v0.1
I (1117) heap_init: Initializing. RAM available for dynamic allocation:
I (1125) heap_init: At 3FCA7640 len 000420D0 (264 KiB): DRAM
I (1131) heap_init: At 3FCE9710 len 00005724 (21 KiB): STACK/DRAM
I (1138) heap_init: At 600FE010 len 00001FF0 (7 KiB): RTCRAM
I (1144) esp_psram: Adding pool of 7168K of PSRAM memory to heap allocator
I (1152) spi_flash: detected chip: gd
I (1156) spi_flash: flash io: qio
I (1160) sleep: Configure to isolate all GPIO pins in sleep state
I (1167) sleep: Enable automatic switching of GPIO sleep configuration
I (1174) app_start: Starting scheduler on CPU0
I (1179) app_start: Starting scheduler on CPU1
I (1179) main_task: Started on CPU0
I (1189) esp_psram: Reserving pool of 8K of internal memory for DMA/internal allocations
I (1197) main_task: Calling app_main()
I (1219) settings: stored ssid:xxx
I (1219) settings: stored password:xxx
I (1219) settings: stored OpenAI:xxx
I (1226) settings: stored Base URL:xxx
I (1361) ESP-BOX-LITE: Partition size: total: 1920401, used: 1072774
I (1362) LVGL: Starting LVGL task
I (1363) gpio: GPIO[4]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
I (1371) gpio: GPIO[48]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
I (1501) button: IoT Button Version: 3.2.0
I (1501) adc button: ADC1 has been initialized
I (1502) adc button: calibration scheme version is Curve Fitting
I (1507) adc button: Calibration Success
I (1512) button: IoT Button Version: 3.2.0
I (1516) button: IoT Button Version: 3.2.0
I (1521) button: IoT Button Version: 3.2.0
I (1526) gpio: GPIO[0]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
I (1539) gpio: GPIO[46]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
I (1551) I2S_IF: channel mode 0 bits:16/16 channel:2 mask:3
I (1552) I2S_IF: STD Mode 1 bits:16/16 channel:2 sample_rate:16000 mask:3
I (1560) Adev_Codec: Open codec device OK
I (1563) I2S_IF: channel mode 0 bits:16/16 channel:2 mask:3
I (1569) I2S_IF: STD Mode 0 bits:16/16 channel:2 sample_rate:16000 mask:3
I (1577) Adev_Codec: Open codec device OK
W (1581) bsp_sensor: This example don't support Sensor!!
I (1587) app_main: Display LVGL demo
I (1592) ESP-BOX-LITE: Setting LCD backlight: 100%
I (1626) app_main: speech recognition start
I (1626) MODEL_LOADER: The storage free size is 22400 KB
I (1626) MODEL_LOADER: The partition size is 4000 KB
I (1629) pp: pp rom version: e7ae62f
I (1636) net80211: net80211 rom version: e7ae62f
I (1632) MODEL_LOADER: Successfully map model partition
I (1647) AFE_SR: afe interface for speech recognition

I (1653) AFE_SR: AFE version: SR_V220727

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

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

I (1672) AFE_SR: wakenet_init: 1

I (1645) wifi:wifi driver task: 3fcbe828, prio:23, stack:6656, core=0
I (1691) wifi:wifi firmware version: b2f1f86
I (1691) wifi:wifi certification version: v7.0
I (1691) wifi:config NVS flash: enabled
I (1694) wifi:config nano formating: disabled
I (1698) wifi:Init data frame dynamic rx buffer num: 32
I (1703) wifi:Init management frame dynamic rx buffer num: 32
I (1708) wifi:Init management short buffer num: 32
I (1713) wifi:Init static tx buffer num: 16
I (1717) wifi:Init tx cache buffer num: 32
I (1720) wifi:Init static tx FG buffer num: 2
I (1725) wifi:Init static rx buffer size: 1600
I (1729) wifi:Init static rx buffer num: 10
I (1733) wifi:Init dynamic rx buffer num: 32
I (1738) wifi_init: rx ba win: 6
I (1740) wifi_init: tcpip mbox: 32
I (1746) wifi_init: udp mbox: 6
I (1748) wifi_init: tcp mbox: 6
I (1752) wifi_init: tcp tx win: 5744
I (1756) wifi_init: tcp rx win: 5744
I (1762) wifi_init: tcp mss: 1440
I (1766) wifi_init: WiFi/LWIP prefer SPIRAM
I (1770) wifi_init: WiFi IRAM OP enabled
I (1774) wifi_init: WiFi RX IRAM OP enabled
I (1782) phy_init: phy_version 601,fe52df4,May 10 2023,17:26:54
I (1853) wifi:mode : sta (xxx)
I (1854) wifi:enable tsf
I (1855) wifi station: start connect to the AP
I (1855) wifi station: xxx
I (1861) wifi station: NET_EVENT_POWERON_SCAN
MC Quantized wakenet9: wakeNet9_v1h24_Hi,ESP_3_0.63_0.635, tigger:v3, mode:2, p:0, (Jan 12 2024 18:00:45)
I (2076) AFE_SR: wake num: 3, mode: 0, (Jan 12 2024 18:00:46)

I (2076) app_sr: Set language EN
I (2076) app_sr: load wakenet:wn9_hiesp
MC Quantized wakenet9: wakeNet9_v1h24_Hi,ESP_3_0.63_0.635, tigger:v3, mode:2, p:0, (Jan 12 2024 18:00:45)
I (2109) AFE_SR: wakenet wn_frame_size = 512

I (2112) app_sr: Feed Task
I (2115) app_sr: audio_chunksize=1024, feed_channel=3
I (2121) app_sr: Detection task
successfully created record_audio_buffer with a size: 256000
audio_rx_buffer with a size: 1048576
I (2293) file_iterator: File : echo_cn_end.wav
I (2306) file_iterator: File : Hi.wav
I (2324) file_iterator: File : echo_cn_wake.wav
I (2331) file_iterator: File : waitPlease.mp3
I (2331) file_iterator: File : echo_en_end.wav
I (2344) file_iterator: File : echo_en_wake.wav
I (2347) file_iterator: File : echo_en_ok.wav
I (2355) file_iterator: File : Hi.mp3
I (2364) file_iterator: File : input.wav
I (2365) file_iterator: File : tts_failed.mp3
I (2368) file_iterator: File : echo_cn_ok.wav
W (2425) app_sr: AFE Fetch Fail
W (2725) app_sr: AFE Fetch Fail
W (3025) app_sr: AFE Fetch Fail
W (3325) app_sr: AFE Fetch Fail
W (3625) app_sr: AFE Fetch Fail
W (3925) app_sr: AFE Fetch Fail
W (4225) app_sr: AFE Fetch Fail
I (4497) wifi station: Total APs scanned = 31, ret:0
I (4497) wifi station: xxxx
I (4596) wifi:new:<6,2>, old:<1,0>, ap:<255,255>, sta:<6,2>, prof:1
I (4597) wifi:state: init -> auth (b0)
I (4603) wifi:state: auth -> assoc (0)
I (4645) wifi:state: assoc -> run (10)
W (4833) app_sr: AFE Fetch Fail
I (4851) wifi:<ba-add>idx:0 (ifx:0, xxx), tid:0, ssn:134, winSize:64
I (4940) wifi:connected with M2-TEST, aid = 2, channel 6, 40D, bssid = xxx
I (4940) wifi:security: WPA2-PSK, phy: bgn, rssi: -29
I (4944) wifi:pm start, type: 1

I (4945) wifi:set rx beacon pti, rx_bcn_pti: 0, bcn_timeout: 25000, mt_pti: 0, mt_time: 10000
I (4988) wifi:AP's beacon interval = 102400 us, DTIM period = 1
W (5120) wifi:[ADDBA]rx delba, code:39, delete tid:0
I (5120) wifi:<ba-del>idx:0, tid:0
W (5121) wifi:[ADDBA]rx delba, code:39, delete tid:0
W (5133) app_sr: AFE Fetch Fail
W (5433) app_sr: AFE Fetch Fail
W (5733) app_sr: AFE Fetch Fail
I (5954) esp_netif_handlers: sta ip: 192.168.8.101, mask: 255.255.255.0, gw: 192.168.8.1
I (5954) wifi station: got ip:192.168.8.101
@github-actions github-actions bot changed the title ESP32-S3-BOX-Lite 运行chatgpt demo 时偶尔出现无法唤醒的问题 ESP32-S3-BOX-Lite 运行chatgpt demo 时偶尔出现无法唤醒的问题 (AEGHB-574) Mar 2, 2024
@LHYhorion
Copy link

已经根据您的环境进行了测试并反复上电,没有复现问题。建议您可以尝试更新一下最新版本,交叉比对,观察是否还会有相同问题出现。

@Wvirgil123
Copy link
Author

已经根据您的环境进行了测试并反复上电,没有复现问题。建议您可以尝试更新一下最新版本,交叉比对,观察是否还会有相同问题出现。

@LHYhorion 不好意思,我测试的时候修改了 esp-sr 的版本, 改成了1.6.1 (当前最近版本, 因为支持更多的唤醒词)
https://components.espressif.com/components/espressif/esp-sr

将esp-sr改回1.3.3, 测试多次都可以正常唤醒。

@LHYhorion
Copy link

好的,不用客气,有问题可以随时提出。

@ESP-Mars ESP-Mars closed this as completed Mar 5, 2024
@Wvirgil123
Copy link
Author

好的,不用客气,有问题可以随时提出。

能否支持支持最新版本的esp-sr 呢

@PengyuYan703
Copy link

我现在正在用 esp-sr 的1.6.1,能支持的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants