I²S Audio Microphone¶
The i2s_audio
microphone platform allows you to receive audio via the the I²S Audio Component.
This platform only works on ESP32 based chips.
Warning
Audio and voice components consume a significant amount of resources (RAM, CPU) on the device.
Crashes are likely to occur if you include too many additional components in your device’s configuration. In particular, Bluetooth/BLE components are known to cause issues when used in combination with Voice Assistant and/or other audio components.
# Example configuration entry
microphone:
- platform: i2s_audio
id: external_mic
adc_type: external
i2s_din_pin: GPIO23
- platform: i2s_audio
id: adc_mic
adc_type: internal
adc_pin: GPIO35
Configuration variables:¶
adc_type (Required, enum):
external
: Use an external ADC connected to the I²S bus.internal
: Use the internal ADC of the ESP32. Only supported on ESP32, no variant support.
channel (Optional, enum): The channel of the microphone. One of
left
orright
. Defaults toright
.bits_per_sample (Optional, enum): The bit depth of the audio samples. Note that while set to
32bit
, the samples will be scaled down to 16bit before being forwarded. One of16bit
or32bit
. Defaults to16bit
.i2s_audio_id (Optional, ID): The ID of the I²S Audio you wish to use for this microphone.
All other options from Microphone
External ADC¶
i2s_din_pin (Required, Pin Schema): The GPIO pin to use for the I²S
DIN/SDIN
(Data In) signal, also referred to asSD/SDATA
(Serial Data) orADCDAT
(Analog to Digital Converter Data).pdm (Required, boolean): Set this to
true
if your external ADC uses PDM (Pulse Density Modulation) instead of I²S.Note
PDM microphones are only supported on ESP32 and ESP32-S3.
Internal ADC¶
Note
Internal ADC microphones are only supported on a regular ESP32, not the variants.
adc_pin (Required, Pin Schema): The GPIO pin to use for the ADC input.
Known Devices¶
M5Stack Atom Echo¶
microphone:
- platform: i2s_audio
adc_type: external
i2s_din_pin: GPIO23
pdm: true
RaspiAudio Muse Luxe¶
microphone:
- platform: i2s_audio
i2s_din_pin: GPIO35
adc_type: external
pdm: false