ESP32-A1S Audio Kit Media Player

Hi Omri,
I’ve started working with the A1S but it’s a bit of a nightmare for lack of documentation.
Could you share some code so I can figure out how to access the LED’s, switches and audio parts? Anything could help a lot.
Best regards

My links …
ESP32 Audio Kit (ESP32-A1S) Info in a german forum
The ‘AI Thinker Audio Kit’ Arduino Challenge
Squeezelite-esp32-on-ESP32-Audio-Kit From squeezelite forums

@viniciusnbs This forum is an English language only forum, please read this post.

I just got my board and thank you so much for the Yaml code, providing all the details. This helped me A LOT setting things up.

Since there are microphones on the board, I was wondering if you can do a wake word detection on the device and then use HA as a server to receive the audio streams, decode them and send back the reply? Anyone tried this already?

Has anyone tried Resonate with this yet?

if anyone is interested how it can work with the new dac_audio stack
here is my working config

esphome:
  name: esp32-audio-kit

esp32:
  board: esp-wrover-kit
  framework:
    type: esp-idf

api:
ota:
  - platform: esphome
    port: 3232

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

logger:
  level: DEBUG

# New audio stack
audio_dac:
  - platform: es8388
    i2c_id: my_i2c_id
    id: es8388_dac
    # Optional codec settings (uncomment/tune if desired)
    # mic_gain_db: 0
    # dac_volume_db: -3
    # de_emphasis: none
    # swap_lr: false

i2c:
  id: my_i2c_id
  sda: GPIO33
  scl: GPIO32

i2s_audio:
  i2s_lrclk_pin: GPIO25
  i2s_bclk_pin: GPIO27
  i2s_mclk_pin: GPIO0
  id: i2s_output

media_player:
  - platform: speaker
    id: esp32_audio_kit_player
    name: "ESP32 Audio Kit"
    announcement_pipeline: 
      speaker: speaker_id

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

switch:
  - platform: gpio
    pin: GPIO21
    name: "AMP Switch"
    restore_mode: ALWAYS_ON

binary_sensor:
  - platform: gpio
    pin:
      number: GPIO39
      inverted: true
      mode:
        input: true
    name: "Jack Status"

  - platform: gpio
    pin:
      number: GPIO036
      inverted: true
    name: "Key 1"
    filters:
      - delayed_off: 10ms

  - platform: gpio
    pin:
      number: GPIO013
      inverted: true
    name: "Key 2"
    filters:
      - delayed_off: 10ms

  - platform: gpio
    pin:
      number: GPIO019
      inverted: true
    name: "Key 3"
    filters:
      - delayed_off: 10ms

  - platform: gpio
    pin:
      number: GPIO023
      inverted: true
      mode:
        input: true
        pullup: true
    name: "Key 4"
    filters:
      - delayed_off: 10ms

  - platform: gpio
    pin:
      number: GPIO018
      inverted: true
      mode:
        input: true
        pullup: true
    name: "Key 5"
    filters:
      - delayed_off: 10ms

  - platform: gpio
    pin:
      number: GPIO005
      inverted: true
      mode:
        input: true
        pullup: true
    name: "Key 6"
    filters:
      - delayed_off: 10ms

light:
  - platform: binary
    name: "Test LED 1"
    output: light_output_1

output:
  - id: light_output_1
    platform: gpio
    pin: GPIO22
    inverted: true
1 Like