Application Solution Series: Audio Applications

From conventional Bluetooth speakers and in-vehicle multimedia head units to next-generation LE Audio headsets, hearing aids, and broadcast audio receivers, audio is moving beyond “playback that works” toward high fidelity, low latency, multi-device synchronization, and two-way interaction. ESP32-S31 is built for this shift, with stronger Classic Bluetooth, LE Audio, and system integration—enabling developers to cover more audio product categories with a single chip.
The ESP32-S31 Bluetooth audio demo showcases these capabilities: Classic Bluetooth A2DP music playback, HFP two-way calling, AVRCP playback control and media metadata retrieval, and LE Audio unicast, broadcast, and dual-device synchronized playback.
Audio Application Highlights

Dual-Mode Bluetooth Audio
Unlike ESP32-S3, which supports BLE only, ESP32-S31 provides full dual-mode Bluetooth (Classic BT + BLE 5.4) support, greatly extending ecosystem compatibility and delivering stronger on-device audio codec performance.
Classic Bluetooth Audio (BR/EDR)
ESP32-S31 natively supports the Classic Bluetooth audio ecosystem, including A2DP music streaming, AVRCP media control, and HFP hands-free calling. It integrates with the large installed base of phones, PCs, and in-vehicle multimedia systems.
For decode performance, ESP32-S31 runs at 320 MHz and integrates 128-bit data paths with SIMD vector instruction acceleration. When decoding high-quality formats such as AAC and SBC, CPU utilization stays in the low single-digit percent range.
LE Audio (BLE 5.4)
ESP32-S31 supports BLE 5.4. Its LE Audio features include CIS-based unicast audio and BIS-based audio distribution, suitable for TWS earbuds, smart hearing aids, and multi-room synchronized broadcast (Auracast) and other next-generation audio products.
At the core of LE Audio, the LC3 codec delivers better audio quality at half the bitrate of legacy SBC. With RISC-V SIMD acceleration, LC3 encode/decode on ESP32-S31 adds minimal CPU overhead, leaving headroom for advanced acoustic processing such as acoustic echo cancellation (AEC) and noise suppression (NS).
Unified Bluetooth Audio Application Interface
The esp_bt_audio component provides a unified layer for Bluetooth audio applications. It manages Classic Bluetooth and LE Audio roles and reports connection state, audio stream state, playback control, volume, and call status to the application through a single event mechanism.
Hardware ASRC
In audio development, different sources often use different sample rates, so the system sample rate must change frequently across use cases. ESP32-S31 integrates a dedicated Audio Sample Rate Converter (ASRC) that converts between sample rates in hardware, combined with DMA for more efficient audio data transfer.
CPU Loading Comparison
| Metric | ESP32-S31 Hardware ASRC | ESP32-S3 Software SRC | Comparison |
|---|---|---|---|
| Average CPU loading | 0.79% | 2.35% | S31 ≈ 33% of S3 |
| Peak CPU loading | 1.86% | 14.17% | S31 peak ≈ 13% of S3 |
Total Memory Usage Comparison
| Metric | ESP32-S31 Hardware ASRC | ESP32-S3 Software SRC | Comparison |
|---|---|---|---|
| Average total memory | 539 B | 19400 B | S31 ≈ 2.8% of S3 |
| Peak total memory | 672 B | 87000 B | S31 peak significantly lower |
Compared with software SRC on ESP32-S3, hardware ASRC on ESP32-S31 delivers significantly lower CPU loading and total memory usage. Across 100 test combinations, ESP32-S31 peaks below 2% CPU and below 1 KB total memory.
Typical Application Scenarios
ESP32-S31 combines Classic Bluetooth audio, LE Audio, hardware ASRC, I2S audio interfaces, and a unified Bluetooth audio software stack to provide a complete foundation for audio applications. For products that must work with existing phone Bluetooth ecosystems, it enables A2DP playback, AVRCP control, and HFP calling with minimal integration effort. For next-generation Bluetooth audio products, it also supports LE Audio unicast, broadcast, and multi-device synchronized playback.
The sections below walk through several representative scenarios in more detail.
Classic Bluetooth Multimedia Control Terminal
This demo uses ESP32-S31 to build a multimedia interaction terminal that combines Classic Bluetooth audio, call control, and on-screen UI rendering. After pairing with a phone, users can play music, view track information and album art, make hands-free calls, and perform basic interactions on the display.
A2DP Music Playback
ESP32-S31 can act as an A2DP Sink to receive Bluetooth music streams from a phone or PC and output audio through an on-board or external audio codec to a speaker.

Album Art and Lyrics
In a multimedia control terminal, ESP32-S31 handles more than audio playback—it can drive a fuller user interface. The demo receives and displays media information from the phone, including track metadata, lyrics, and album art, giving a small embedded device an interaction experience closer to a consumer electronics product.


Music Control
Through AVRCP, ESP32-S31 is not only a passive audio receiver—it can act as an independent Bluetooth media control terminal with two-way control.
Users do not need to touch the phone. From the on-device UI—previous track, play/pause, next track, and similar controls—they can control the phone’s music app. Control state stays synchronized on both sides: pausing on the device pauses playback on the phone, and the on-screen button state updates accordingly.


Volume control can also stay linked with the phone. When the user adjusts system media volume on the phone, ESP32-S31 receives the change and updates local playback output so that volume, playback state, and track information remain consistent between phone and device—improving the completeness of screen-equipped Bluetooth audio products.

HFP Two-Way Hands-Free Calling
When a call arrives or is placed on the phone, ESP32-S31 can join the call in the HFP Hands-Free role: downlink audio goes to the speaker, and uplink audio is captured through an external microphone. On the uplink path, ESP32-S31 uses its 320 MHz CPU to run acoustic echo cancellation (AEC) in real time, so even in hands-free mode it can send clear uplink speech without echo to the remote party. Combined with the on-screen UI, the device can show call status and support dial, answer, and hang-up actions.
After a call is initiated on the phone, the user can switch call audio to ESP32-S31. The device shows the call UI and takes over speaker playback and microphone capture. This suits screen-equipped Bluetooth speakers, in-vehicle head units, desktop conference terminals, and other products that need “phone connection + local hands-free.”

ESP32-S31 can also serve as the dialing entry point. The demo provides a numeric keypad on the device screen. Users can enter a number on the device and place a call; the phone follows the same dial/call flow, extending ESP32-S31 from an audio peripheral to a Bluetooth phone control terminal.

During a call, ESP32-S31 can show call status in real time and supports one-tap hang-up on the device.

LE Audio Multi-Device Synchronized Playback
LE Audio is valuable not only for lower power and new codecs, but for a systematic approach to audio distribution and synchronized playback across multiple devices. ESP32-S31 can be used as an LE Audio unicast receiver, broadcast receiver, or left/right split synchronized playback device.
Unicast Audio: TWS and Hearing Aids
CIS-based LE Audio unicast suits low-latency point-to-point or multi-device audio links. For TWS earbuds and smart hearing aids, two ESP32-S31 devices can each receive the corresponding audio stream and achieve synchronized playback through LE Audio timing and the local audio output path.


Broadcast Audio: Shared Listening and Spatial Audio Distribution
Auracast-based LE Audio broadcast suits one-to-many audio distribution. A single source can broadcast an audio stream to multiple ESP32-S31 receivers. Receivers can join broadcast audio without traditional pairing, suitable for exhibition guides, conference interpretation, public TV listening, multi-room synchronized playback, and similar scenarios.

Multi-Device Audio Control Synchronization
In LE Audio scenarios, ESP32-S31 synchronizes multi-device audio control in real time: when the phone plays music, the track title can appear on the ESP32-S31 display; users can skip tracks and pause from the ESP32-S31 terminal; volume changes on the phone are also reflected on ESP32-S31 in real time.



Multi-Device Playback Synchronization
The figures below show synchronized playback across two LE Audio devices. Short periodic pulse tones are used to check waveform alignment at the left and right outputs, evaluating start-time consistency and long-term sync stability in multi-device playback.
In the short-tone sync test, the left and right waveforms align at the start, indicating both receivers can maintain consistent playback timing for the same audio event.

The left and right audio pulses stay aligned throughout the observation window, reflecting stable LE Audio multi-device synchronized playback on ESP32-S31.

Open-Source Resources
esp_bt_audio: https://components.espressif.com/components/espressif/esp_bt_audio/versions/0.8.2/readme
esp-gmf: https://github.com/espressif/esp-gmf