Learn/Disco PartyRemade with Rust

rusty_esp_audio — I2S And PDM Without ESP-ADF

rusty_esp_audio remakes ESP-ADF, ESP-GMF, and esp_codec_dev: I2S/PDM capture and playback, a fixed-block pipeline, Opus and FLAC on the chip.

Signed by M·
Ribbon microphone on a walnut desk beside a notebook
What is rusty_esp_audio?

rusty_esp_audio remakes ESP-ADF: I2S and PDM capture and playback, a fixed-block pipeline, and Opus and FLAC on the chip.

🪩 The Disco Party is MATA's distributed cloud.

rusty_esp_audio is Espressif's audio stack remade. The repo is rusty_esp_audio. ESP-ADF, ESP-GMF, and esp_codec_dev are C pipelines: I2S, PDM, codec-chip drivers, a heap that surprises you on a 16-bit frame. A wake word that still links that tree is a microphone pointed at a vendor.

This crate is I2S and PDM capture and playback, a fixed-block audio pipeline, codec-chip drivers, and Opus / FLAC / ADPCM framing through the Remade codecs. The core is no_std. esp32 iroh carries the Janus audio ALPN. Janus is the doorway.

Why ESP-ADF Does Not Belong On A Home Companion

Audio on a chip is DMA, clocks, and parsers. Parsers are where devices die: RTP, FLAC headers that claim billions of samples, ADPCM frames that lie about length. In C those are heap over-reads. In this crate they are errors. The IETF's RTP specification is public, which means an attacker knows the header layout. The NIST Secure Software Development Framework wants that class of defect designed out.

Trust is who may hear the mic: mID, not a default password. Security is sealed PCM on the mesh, not an open MQTT topic of 16-bit samples. Incentive is a house that can run a wake word without paying a speech API per utterance. The Federal Trade Commission already knows how baby monitors leak.

How rusty_esp_audio Keeps The Pipeline Fixed-Block

Borrowed PCM. Caller-owned memory. rusty_esp_core's PcmBlock<'a> is a view, not a Vec per tick. A doorbell that allocates a plane per sample will brown out. The pipeline is fixed-block because the die is small and the clock is real.

Opus And FLAC, Not libopus FFI

Framing goes through rusty-opus and rusty_flac. libopus and libFLAC are the C twins this catalog already deleted on the host. The chip does not get a pass. Deputy keeps a -sys codec from returning through a "temporary" feature.

I2S And PDM Are Drivers. The Product Is The Grant.

wifi::begin and mic::read stay in rusty_esp_arduino so a sketch still looks like a sketch. The substrate is this crate. A maker who has to learn Embassy to blink an I2S clock will not ship. Rust on Arduino is the promise. rusty_esp_audio is the I2S underneath it.

Remade Primitives, Disco Party, Digital Freedom

rusty_esp_audio, rusty-opus, rusty_flac, and esp32 iroh are Remade-With-Rust primitives. They become a disco party when a mic is a peer, not a clip in a vendor archive. They become Digital Freedom when Trust, Security, and Incentive reach the kitchen radio. Start at the Disco Party and Remade with Rust. Capture without ESP-ADF. Flash home mics through dldeploy.

Video on the same board is rusty_esp_video. The mesh is esp32 iroh. The Arduino facade is Rust on Arduino. The amateur cut is secure and easy Arduino. The household product is Era 4: Home Companion.

FAQ

Short answers already in this article.

Does rusty_esp_audio still need the ESP-ADF C pipeline?

rusty_esp_audio remakes ESP-ADF, ESP-GMF, and esp_codec_dev. It is I2S and PDM capture and playback, a fixed-block pipeline, codec-chip drivers, and Opus, FLAC, and ADPCM framing through the Remade codecs. The core is no_std. Capture without ESP-ADF.

Why does rusty_esp_audio keep the audio pipeline fixed-block?

Borrowed PCM uses caller-owned memory. rusty_esp_core's PcmBlock is a view, not a Vec per tick. A doorbell that allocates a plane per sample will brown out. The pipeline is fixed-block because the die is small and the clock is real.

How does rusty_esp_audio frame Opus and FLAC without libopus?

Framing goes through rusty-opus and rusty_flac. libopus and libFLAC are the C twins this catalog already deleted on the host, and the chip does not get a pass. Deputy keeps a -sys codec from returning through a temporary feature.

Who is allowed to hear a microphone running rusty_esp_audio?

Trust is who may hear the mic: mID, not a default password. Security is sealed PCM on the mesh, not an open MQTT topic of 16-bit samples. esp32 iroh carries the Janus audio ALPN, and Janus is the doorway.

Can a sketch call rusty_esp_audio without learning Embassy?

wifi::begin and mic::read stay in rusty_esp_arduino so a sketch still looks like a sketch. The substrate is rusty_esp_audio. A maker who has to learn Embassy to blink an I2S clock will not ship.