Need help with some basics in testing ESP32-C3 voice assistant

I’ve been playing with an esp32-s3 and MAX98357A i²s DAC/ AMP today, so that part is kind of easy’ish (should be relatively similar on the ESP32-C3, but I would be concerned about the ESP32-C3 performance for this task as well):

substitutions:
  name: esphome-XXXX
  friendly_name: esp32-s3

esphome:
  name: ${name}
  friendly_name: ${friendly_name}

esp32:
  board: esp32-s3-devkitc-1
  flash_size: 16MB
  cpu_frequency: 240MHz
  framework:
    type: esp-idf
    sdkconfig_options:
      CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240: "y"
      CONFIG_ESP32S3_DATA_CACHE_64KB: "y"
      CONFIG_ESP32S3_DATA_CACHE_LINE_64B: "y"

psram:
  mode: octal
  speed: 80MHz

# Enable logging
logger:
  hardware_uart: USB_SERIAL_JTAG

# Enable Home Assistant API
api:
  encryption:
    key: !secret esp32-s3_api_key

ota:
  - platform: esphome
    id: ota_esphome
    password: !secret esp32-s3_ota_password

wifi:
  ssid: !secret wifi_ssid_wpa3
  password: !secret wifi_password_wpa3

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Esp32-S3 Fallback Hotspot"
    password: !secret wifi_password_fallback

captive_portal:

web_server:
  port: 80

i2s_audio:
    id: i2s_audio_bus # For speaker
    i2s_lrclk_pin: GPIO16
    i2s_bclk_pin: GPIO15

speaker:
  - platform: i2s_audio
    id: box_speaker
    i2s_audio_id: i2s_audio_bus
    dac_type: external
    i2s_dout_pin:   
      number: GPIO7 # DIN Pin of the MAX98357A Audio Amplifier
    channel: stereo
    buffer_duration: 1000ms

media_player:
  - platform: speaker
    name: None
    id: speaker_media_player
    volume_min: 0.5
    volume_max: 0.8
    announcement_pipeline:
      speaker: box_speaker
      format: FLAC
      sample_rate: 48000
      num_channels: 1  # mono, single MAX98357A

3 GPIOs needed:

  • GPIO7: DIN
  • GPIO15: BCLK
  • GPIO16: LRC(LK)

GAIN and GND connected to ground, VIN and 5V connected to 3.3V.

//done.

Useful schematics: https://cdn.static.spotpear.com/uploads/picture/learn/ESP32/ESP32-S3-1.28inch-AI/ESP32S3-1.28inch-AI.pdf

Interesting read: SpotPear "DeepSeek Voice Chat" config

1 Like