Hello,
I have made a custom ESP S3 board with some voice assist hardware. The hardware is largely based on the ESPbox reference. As of now the mic is working great but every time the assist tries to play audio it throws an unexpected error, and if I try to play audio directly the logs fill up with the message “Error writing to I2S: ESP_ERR_INVALID_STATE”
The I2C buses appear fine, sensors work. Lights work. I am connecting via W5500 ethernet. I just do no know enough about the audio segment to begin to troubleshoot if I have a hardware issue, config issue, or some other issue.
Can anyone help point me int he right direction? Relevant config below
external_components:
- source: github://rpatel3001/esphome@es7210
components:
- es7210
- source:
type: git
url: https://github.com/esphome/home-assistant-voice-pe
ref: dev
components:
- media_player
- nabu
i2s_audio:
i2s_lrclk_pin: GPIO45
i2s_bclk_pin: GPIO17
i2s_mclk_pin: GPIO02
id: audio_bus
audio_dac:
- platform: es8311
id: es8311_dac
bits_per_sample: 24bit
sample_rate: 16000
i2c_id: audio_i2c
use_mclk: true
es7210:
i2c_id: audio_i2c
speaker:
- platform: i2s_audio
i2s_audio_id: audio_bus
id: ${devicename}_speaker
i2s_dout_pin: GPIO15
dac_type: external
channel: mono
audio_dac: es8311_dac
sample_rate: 16000
bits_per_sample: 24bit
i2s_comm_fmt: stand_i2s
media_player:
- platform: nabu
name: ${devicename}_media
id: ${devicename}_media
audio_dac:
speaker:
volume_increment: 0.05
volume_min: 0.4
volume_max: 0.85
files:
- id: timer_finished_sound
file: https://github.com/esphome/home-assistant-voice-pe/raw/dev/sounds/timer_finished.flac
- id: wake_word_triggered_sound
file: https://github.com/esphome/home-assistant-voice-pe/raw/dev/sounds/wake_word_triggered.flac
- id: easter_egg_tick_sound
file: https://github.com/esphome/home-assistant-voice-pe/raw/dev/sounds/easter_egg_tick.mp3
- id: easter_egg_tada_sound
file: https://github.com/esphome/home-assistant-voice-pe/raw/dev/sounds/easter_egg_tada.mp3
microphone:
- platform: i2s_audio
id: external_mic
adc_type: external
pdm: false
i2s_din_pin: GPIO16
bits_per_sample: 16bit