Search found 39 matches

by tempo.tian
Fri Aug 12, 2022 4:01 am
Forum: ESP-ADF 中文讨论版
Topic: ESP32 Lyrat 运行官方示例 player\pipeline_sdcard_mp3_control 出错,按下PLAY键后没有声音播放,SD卡中音乐正常运行其他示例
Replies: 1
Views: 2612

Re: ESP32 Lyrat 运行官方示例 player\pipeline_sdcard_mp3_control 出错,按下PLAY键后没有声音播放,SD卡中音乐正常运行其他示例

这个实例里面用到了resample模块需要比较多的memory
从log分析看是memory 不够了
) FIR_RESAMPLE: failed to allocate p_out buffer.size 35666 line 2010

你可以打开SPI Ram来跑,这样内存优先在外部SPI Ram上
idf.py menuconfig --> component config --> Esp32 specific --> Support for external, SPI-connected Ram
by tempo.tian
Fri Aug 12, 2022 3:20 am
Forum: ESP-ADF
Topic: Downmix BT stream from stereo to mono
Replies: 5
Views: 6638

Re: Downmix BT stream from stereo to mono

There is a hacky way, which use lowest resource. After pipeline is linked, ringbuf is malloc and liked to each element. Actually we can set output cb to overwrite the behavior, we reuse the malloc ringbuf but fill with stuff after processing in output callback. // for example you have a mp3 decode a...
by tempo.tian
Thu Aug 11, 2022 1:36 pm
Forum: ESP-ADF
Topic: custome board
Replies: 3
Views: 11511

Re: custome board

I think you can follow below steps to customize a board. Under components/audio_board you can see lots of board sub folder, each of the folder is a board. So customized board also can place in such folder ex: your_board . under your_board you need put board.h --> this file just define API board_pins...
by tempo.tian
Wed Jul 20, 2022 1:21 pm
Forum: ESP-ADF
Topic: Trying to fetch buffer from microphone
Replies: 5
Views: 4388

Re: Trying to fetch buffer from microphone

After i2s is initialized you can directly call i2s_read API to read data. Following code do initialize oper. After this you can malloc a buffer and call i2s_read to read data directly. One point you should pay attention is that make sure fetch data is quicker enough than i2s input rate. i2s_stream_c...
by tempo.tian
Wed Jul 13, 2022 12:58 pm
Forum: ESP-ADF
Topic: MP3 MIXER implementation
Replies: 2
Views: 4349

Re: MP3 MIXER implementation

You can look this example firstly, I think it is what you needed.
https://github.com/espressif/esp-adf/tr ... udio_forge
by tempo.tian
Thu Jul 07, 2022 12:44 pm
Forum: ESP-ADF 中文讨论版
Topic: 整合离线语音识别ASR和TTS,内存映射时发生内存不足的错误,TTS字典不能正常映射到数据空间
Replies: 3
Views: 4902

Re: 整合离线语音识别ASR和TTS,内存映射时发生内存不足的错误,TTS字典不能正常映射到数据空间

看定义ESP32应该最多只能mmap 4M的data空间给用户使用
如果多次调用mmap,会导致可以mmap的空间变小
tts的代码,默认mmap的是3M的空间,所以之前如果没有做mmap的话应该可以成功如果有人mmap过了就不行了

同时做语音识别和唤醒,可以尝试下分时的来处理,唤醒后释放掉资源再做tts
tts释放后再做唤醒

如果可以用ESPS3的话可以多一个可能性,语音识别的模型可以放到SDcard或者SPIFFS上避免很大的空间占用,两者可以同时跑
by tempo.tian
Wed Jun 29, 2022 2:20 am
Forum: ESP-ADF 中文讨论版
Topic: VoIP 出现的问题
Replies: 6
Views: 9391

Re: VoIP 出现的问题

log已经指出了出问题的点
在支持PSram的情况下,VOIP的task会优先把任务堆栈放到PSRAM上,避免RAM不够

IDF默认没有 xTaskCreateRestrictedPinnedToCore.这个函数
所以打上patch就可以了,你可以在本地找到对应patch,github上patch路径如下:
https://github.com/espressif/esp-adf/tr ... df_patches
by tempo.tian
Wed Jun 22, 2022 12:46 pm
Forum: ESP-ADF
Topic: How to get the sdcard handler in the ADF read MP3 from sdcard example
Replies: 3
Views: 5203

Re: How to get the sdcard handler in the ADF read MP3 from sdcard example

You do not need to get sdcard handle.
You can call function in <stdio.h> directly to operate open, read, close file action using fopen, fclose etc.
by tempo.tian
Wed Jun 22, 2022 12:18 pm
Forum: ESP-ADF
Topic: Detect HTTP Stream Content Type and change encoder
Replies: 2
Views: 3708

Re: Detect HTTP Stream Content Type and change encoder

Opus always encapsulated in OGG container.
It is easy to check file header to determine whether it is opus or mp3.
Ex: Opus starts with "oggS" and "OpusHead" while mp3 starts with "ID3" or 0xFF.