Features Wishlist

Waveshare esp32s3-4b - Add speaker/Mic Support (and Mediaplayer in HA)

snakedog116Suggested this wish Β·

I submitted a pull request using a YAML override that I created to get the speaker working on the 4" Waveshare ESP32-S3.

I'm not very active on Github and I'm hoping that's the right way to submit that.

If not, the below code works for me in Tessera's YAML override. Hopefully it helps someone else.

i2s_audio:
  - id: board_i2s
    i2s_mclk_pin: GPIO5
    i2s_bclk_pin: GPIO16
    i2s_lrclk_pin: GPIO7

audio_dac:
  - platform: es8311
    id: board_dac
    i2c_id: touch_bus
    address: 0x18
    sample_rate: 16000
    bits_per_sample: 16bit
    use_mclk: true
    use_microphone: false    # the mics are on the ES7210

speaker:
  - platform: i2s_audio
    id: board_speaker
    i2s_audio_id: board_i2s
    i2s_dout_pin: GPIO6
    dac_type: external
    audio_dac: board_dac
    channel: mono
    sample_rate: 16000
    bits_per_sample: 16bit
    buffer_duration: 50ms

switch:
  - platform: gpio
    id: board_speaker_amp
    internal: true
    pin:
      pca9554: expander
      number: 3
    restore_mode: ALWAYS_ON   # amp stays on: this is the version that worked

media_player:
  - platform: speaker
    id: board_media_player
    name: "Media Player"
    announcement_pipeline:
      speaker: board_speaker
      format: FLAC
      sample_rate: 16000
      num_channels: 1

Discussion 0

Add a comment

Start the conversation

Share an example, ask a question or explain how you would use this.

Add your thoughts, a screenshot or a useful link.

Markdown & basic HTML
Paste or drop images Β· URLs on their own line become previews0 / 10,000
Create your account to join in

We need a verified email address to reach you about your contribution. Your address stays private.

Continue with GitHub

Your draft stays in this tab. Return here after verification.