The example records 10 seconds AMR-NB or AMR-WB audio file to microSD Card. The AMR audio compression format is optimized for speech coding and produces much smaller output files comparing to other popular codecs.
This demo makes use of callback function instead of Message Queue for events. For instance, pipeline_amr_sdcard example uses Message Queue for events.
This example is will run on boards marked with green checkbox. Please remember to select the board in menuconfig as discussed is section Usage below.
Board Name | Getting Started | Chip | Compatible |
---|---|---|---|
ESP32-LyraT | ![]() |
![]() |
|
ESP32-LyraTD-MSC | ![]() |
![]() |
|
ESP32-LyraT-Mini | ![]() |
![]() |
|
ESP32-Korvo-DU1906 | ![]() |
![]() |
|
ESP32-S2-Kaluga-1 Kit | ![]() |
![]() |
Prepare the audio board:
- Insert a microSD card into board's slot.
Configure the example:
- Select compatible audio board in
menuconfig
>Audio HAL
. - You may change between AMR-NB and AMR-WB encoder in
menuconfig
>Example configuration
>Audio encoder file type
.
Load and run the example:
- Speak to the board once prompted on the serial monitor.
- After finish, you can open
/sdcard/rec.amr
or/sdcard/rec.Wamr
to hear the recorded file.