Hello,
I am trying to stream full duplex audio between an ESP32S3 (Adafruit Metro board) and a remote computer, for now a Raspberry PI.
I can send UDP audio packets from the Raspberry PI to the ESP32 over WiFi. I send a packet every 10 ms, capture it on the ESP32 and push it to the I2S bus to be played on a speaker. This path works great. I use 16 kHz sampling rate, and do not even compress the audio so each packet has 160 samples, 2 bytes per sample.
The problem is in the other direction. I cannot sent UDP packets at a high rate. If I send few packets per seconds, everything works fine, but if I try to send 100 packets per seconds (10 ms frames) I get many ENOMEN (errno=12) from the sendto call. I tried to reduce the packet rate to 50 packets per second (20 ms frame) but that did not help. The problem seems related to the packet rate, not the size of the packets.
Is there some information somewhere on how to configure LWIP or the WiFi driver to work well in UDP. What should I tune to achieve a reasonable realtime audio performance? I would be OK if I could do 25 packets per second, but even at that rate I am still getting burst of ENOMEM errors.
The strange thing is sometime it works for a long time without any errors, but suddenly for no obvious reason, I get those bursts of errors and then it recovers. Is it related to the WiFi spectrum?
Thanks
UDP audio streaming over WiFi
Jump to
- English Forum
- Explore
- News
- General Discussion
- FAQ
- Documentation
- Documentation
- Sample Code
- Discussion Forum
- Hardware
- ESP-IDF
- ESP-BOX
- ESP-ADF
- ESP-MDF
- ESP-WHO
- ESP-SkaiNet
- ESP32 Arduino
- IDEs for ESP-IDF
- ESP-AT
- ESP IoT Solution
- ESP RainMaker
- Rust
- ESP8266
- Report Bugs
- Showcase
- Chinese Forum 中文社区
- 活动区
- 乐鑫活动专区
- 讨论区
- 全国大学生物联网设计竞赛乐鑫答疑专区
- ESP-IDF 中文讨论版
- 《ESP32-C3 物联网工程开发实战》书籍讨论版
- 中文文档讨论版
- ESP-AT 中文讨论版
- ESP-BOX 中文讨论版
- ESP IoT Solution 中文讨论版
- ESP-ADF 中文讨论版
- ESP Mesh 中文讨论版
- ESP Cloud 中文讨论版
- ESP-WHO 中文讨论版
- ESP-SkaiNet 中文讨论版
- ESP 生产支持讨论版
- 硬件问题讨论
- 项目展示
Who is online
Users browsing this forum: Baidu [Spider] and 75 guests
- All times are UTC
- Top
- Delete cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. ESP8266EX and ESP32 are some of our products.