[New Component] Full-Duplex Intercom for ESPHome — ESP32 two-way audio with AEC, Voice Assistant coexistence, and Home Assistant integration #3461
Replies: 4 comments 3 replies
-
|
Any option to also have direct intercom between two (or more) ESPs? Even if there's no HA or HA is down? Simply with static IPs, being able to "shout in" from a microphone-based ESP to one or more speakers. Like when in a mall when they make an announcement, without having to "answer" a "call" (or auto-answer it). |
Beta Was this translation helpful? Give feedback.
-
|
@n-IA-hane I like your idea. In the home assistant community forum, multiple people already requested this and were waiting for a solution. :) From a user perspective, it would be great if it could somehow be combined with voice assistants. Like: "Please call room xy". Not sure whether it is possible to run your component on the same microphone the voice assistant is listening (could be stopped while intercom is running). Maybe @kahrendt or @jesserockz can provide feedback, how to integrate your existing implementation. |
Beta Was this translation helpful? Give feedback.
-
|
Just to let you know, there is also the following code available, which enables microphone post-processing on the ESP itself as a component, creating a seperate (post-processed) microphone: It might be nice to decouple your approach from audio post-processing like implemented as in the code above. I'm mainly interested in parts of your work, namely the single I2S bus, driving a speaker and microphone at the same time, but also on microphone post-processing (like Noise Cancelling and Auto Gain). |
Beta Was this translation helpful? Give feedback.
-
|
Thanks @rmeissn for pointing that out! I've had a look at Craig's ESP-AFE component — interesting approach using the full I've just updated the proposal above to reflect the current state of the project, which has evolved significantly from the original UDP Intercom. The new Intercom API architecture is TCP-based with HA as a PBX hub, and the components are already decoupled:
Each one is a separate ESPHome component and can be used independently. Regarding NS and AGC — our Would love your feedback on the updated proposal — especially on |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
[New Component] Full-Duplex Intercom for ESPHome — ESP32 two-way audio with AEC, Voice Assistant coexistence, and Home Assistant integration
ESPHome Intercom API — a full-duplex, real-time, bidirectional audio intercom for ESP32 devices. Supports echo cancellation (AEC), runs alongside Voice Assistant + Micro Wake Word on the same device, and uses Home Assistant as a PBX hub for multi-device calling.
Doorbell, baby monitor, room-to-room intercom — one component, zero external dependencies.
Repository: https://github.com/n-IA-hane/intercom-api
Idle
Calling
Ringing
In Call
From UDP Intercom to Intercom API
The original UDP Intercom worked well on local networks with go2rtc. This new version takes a different approach to unlock additional capabilities:
Architecture
Features
on_incoming_call,on_outgoing_call,on_streaming,on_idle,on_hangup,on_call_failedVoice Assistant Coexistence
The intercom runs alongside Voice Assistant and Micro Wake Word on the same ESP32. You can trigger the wake word and talk to your assistant during an active intercom call. The AEC prevents the TTS audio from feeding back into the intercom stream.
Bundled Components
intercom_api— The Intercom EngineTCP server with FreeRTOS tasks for real-time audio. Handles call state machine (Idle → Outgoing → Ringing → Streaming → Idle), audio I/O, protocol messaging.
i2s_audio_duplex— Full-Duplex Single-Bus I2SStandard ESPHome
i2s_audiocannot drive mic + speaker on the same I2S bus simultaneously.i2s_audio_duplexsolves this for codecs like ES8311, ES8388, WM8960:esp_aec— Acoustic Echo CancellationLightweight AEC using Espressif's ESP-SR library. Multiple modes from
voip_low_costtosr_high_perf. Configurable filter length.intercom_native— Home Assistant IntegrationCustom component that registers WebSocket API, creates device sensors, and manages the auto-bridge for ESP↔ESP calls.
Lovelace Card
Custom card with:
Example Configuration
Minimal (Simple Mode — doorbell)
Full Mode (ESP ↔ ESP intercom)
Single-Bus Codec (ES8311 with i2s_audio_duplex)
Tested Hardware
i2s_audio)i2s_audio_duplex)Audio Format
TCP Protocol (Port 6054)
Binary protocol with 4-byte header:
[Type, Flags, Length_Lo, Length_Hi]Status
This is actively developed and used daily. Current version: v2.0.3.
Full documentation, installation guide, and example YAML configurations available at:
https://github.com/n-IA-hane/intercom-api
Questions for Maintainers
@rmeissn raised a great point about decoupling audio processing from the intercom logic. Currently the repo includes:
intercom_api— the intercom engine (TCP + call state machine)i2s_audio_duplex— full-duplex single-bus I2S driveresp_aec— AEC wrapperThese are already separate ESPHome components and can be used independently.
i2s_audio_duplexin particular fills a real gap in ESPHome — many codecs (ES8311, ES8388, WM8960) use a single I2S bus, and there's no native ESPHome solution for full-duplex on a single bus.Questions:
i2s_audio_duplexespecially seems broadly useful)esp_aecbe extended to support the full ESP-AFE pipeline (NS + AGC + BSS)? Or keep it lightweight?Happy to refactor as needed.
Beta Was this translation helpful? Give feedback.
All reactions