ES8388¶
The es8388
component allows your ESPHome devices to use the es8388 low power audio codec (datasheet)
This allows the playback of audio through two channel high performance audio DAC output via the microcontroller from a range of sources via Speaker Components or
Media Player Components .
It also allows your ESPHome devices to use the es8388
high performance two channel audio ADC.
This allows attached microphones to be used as a microphone input via I²S Audio Microphone.
The I²C bus is required in your configuration as this is used to communicate with the es8388.
Audio DAC¶
# Example configuration entry
audio_dac:
- platform: es8388
Configuration variables:¶
Select¶
The es8388
select allows you to control the dac output
and the adc input_mic
of your ES8388.
select:
- platform: es8388
es8388_id: es8388_parent
dac_output:
name: "DAC Output"
adc_input_mic:
name: "ADC Input MIC"
Configuration variables:¶
Automations¶
All Audio DAC Automations are supported by this platform.
Configuration Examples¶
ESP32 Audio Kit:
i2c:
sda: GPIO33
scl: GPIO32
frequency: 100kHz
id: bus_a
audio_dac:
- platform: es8388
id: es8388_dac
select:
- platform: es8388
es8388_id: es8388_dac
dac_output:
name: "DAC Output"
adc_input_mic:
name: "ADC Input MIC"
i2s_audio:
id: i2s_output
i2s_lrclk_pin: GPIO25
i2s_bclk_pin: GPIO27
i2s_mclk_pin: GPIO0
speaker:
- platform: i2s_audio
i2s_audio_id: i2s_output
sample_rate: 48000
id: speaker_id
i2s_dout_pin: GPIO26
bits_per_sample: 32bit
dac_type: external
channel: stereo
buffer_duration: 100ms
audio_dac: es8388_dac
microphone:
- platform: i2s_audio
i2s_din_pin: GPIO35
id: mic1
adc_type: external
pdm: false
sample_rate: 16000
bits_per_sample: 16bit
switch:
- platform: gpio
pin: GPIO21
id: mute_switch
name: "AMP Switch"
restore_mode: ALWAYS_ON