espressif / esp-adf

Espressif Audio Development Framework
Other
1.52k stars 669 forks source link

recorder_engine: documentation unclear, no example (AUD-4874) #1074

Closed stintel closed 11 months ago

stintel commented 12 months ago

Environment

I (0) cpu_start: App cpu up. I (240) cpu_start: Pro cpu start user code I (241) cpu_start: cpu freq: 160000000 I (241) cpu_start: Application information: I (243) cpu_start: Project name: esp_adf_skel I (249) cpu_start: App version: b35972e I (254) cpu_start: Compile time: Sep 6 2023 16:42:05 I (260) cpu_start: ELF file SHA256: b3ae7fd0e41ec34b... I (266) cpu_start: ESP-IDF: v4.4.5 I (271) cpu_start: Min chip rev: v0.0 I (275) cpu_start: Max chip rev: v0.99 I (280) cpu_start: Chip rev: v0.1 I (285) heap_init: Initializing. RAM available for dynamic allocation: I (292) heap_init: At 3FC95C60 len 00053AB0 (334 KiB): D/IRAM I (298) heap_init: At 3FCE9710 len 00005724 (21 KiB): STACK/DIRAM I (305) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM I (311) heap_init: At 600FE000 len 00002000 (8 KiB): RTCRAM I (318) spi_flash: detected chip: gd I (322) spi_flash: flash io: dio W (326) spi_flash: Detected size(16384k) larger than the size in the binary image header(2048k). Using the size in the binary image header. I (340) sleep: Configure to isolate all GPIO pins in sleep state I (346) sleep: Enable automatic switching of GPIO sleep configuration I (353) cpu_start: Starting scheduler on PRO CPU. I (0) cpu_start: Starting scheduler on APP CPU. I (374) ESP_ADF_SKEL: starting E (374) REC_ENG: Invalid parameters E (374) ESP_ADF_SKEL: failed to create recorder engine I (384) ESP_ADF_SKEL: running main loop

- Compiler version: xtensa-esp32-elf-gcc (crosstool-NG esp-2021r2-patch5) 8.4.0
- Operating system:     Linux
- Using an IDE?: No
- Power supply:         USB

## Problem Description

We're investigating [recorder_engine](https://espressif-docs.readthedocs-hosted.com/projects/esp-adf/en/latest/api-reference/speech-recognition/recorder_engine.html) for use in [Willow](https://github.com/toverainc/willow). It is unclear from the documentation how to properly use it, and there are no examples using it.

### Expected Behavior

Recorder engine initializes.

### Actual Behavior

Recorder engine fails to initialize. Error message is not useful:

E (373) REC_ENG: Invalid parameters


### Steps to Reproduce

See https://github.com/toverainc/esp-skel/commit/6c89e0e438133d4fdbdeea720e36cf113e88dd7e

### Code to Reproduce This Issue

See https://github.com/toverainc/esp-skel/tree/bugreport/rec_engine/adf.

## Debug Logs

NA



## Other Items If Possible

- [ ] sdkconfig file (Attach the sdkconfig file from your project folder)
- [ ] elf file in the ``build`` folder (**Note this may contain all the code details and symbols of your project.**)
- [ ] coredump (This provides stacks of tasks.)
jason-mao commented 12 months ago

@stintel An open source, compatible and extensible component audio_recorder is recommended instead of recorder_engine.

stintel commented 11 months ago

Hi @jason-mao. Thanks for getting back to me. We're currently using audio_recorder in Willow. If use of audio_recorder is recommended instead of recorder_engine, it would be a good idea to mention that in the recorder_engine docs.

jason-mao commented 11 months ago

@stintel Thanks for your advice, I will fixed it.