Skip to content

Commit

Permalink
remove adf dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
kahrendt committed Dec 24, 2024
1 parent 35f6e76 commit 5638ad9
Showing 1 changed file with 46 additions and 15 deletions.
61 changes: 46 additions & 15 deletions esp32-s3-box-3/esp32-s3-box-3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ substitutions:
esphome:
name: ${name}
friendly_name: ${friendly_name}
min_version: 2024.9.0
min_version: 2025.1.0
name_add_mac_suffix: true
platformio_options:
board_build.flash_mode: dio
Expand All @@ -61,21 +61,12 @@ esp32:
CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240: "y"
CONFIG_ESP32S3_DATA_CACHE_64KB: "y"
CONFIG_ESP32S3_DATA_CACHE_LINE_64B: "y"
CONFIG_AUDIO_BOARD_CUSTOM: "y"
CONFIG_ESP32_S3_BOX_3_BOARD: "y"
components:
- name: esp32_s3_box_3_board
source: github://jesserockz/esp32-s3-box-3-board@main
refresh: 0s

psram:
mode: octal
speed: 80MHz

external_components:
- source: github://pr#5230
components: esp_adf
refresh: 0s
- source: github://jesserockz/esphome-components
components: [file]
refresh: 0s
Expand Down Expand Up @@ -141,16 +132,46 @@ light:
restore_mode: RESTORE_DEFAULT_ON
default_transition_length: 250ms

esp_adf:
board: esp32s3box3
i2c:
scl: GPIO18
sda: GPIO8

i2s_audio:
- id: i2s_audio_bus
i2s_lrclk_pin: GPIO45
i2s_bclk_pin: GPIO17
i2s_mclk_pin: GPIO2

audio_dac:
- platform: es8311
id: es8311_dac
bits_per_sample: 16bit
sample_rate: 16000

es7210:
id: es7210_adc
bits_per_sample: 16bit
sample_rate: 16000

microphone:
- platform: esp_adf
- platform: i2s_audio
id: box_mic
sample_rate: 16000
i2s_din_pin: GPIO16
bits_per_sample: 16bit
adc_type: external


Check failure on line 164 in esp32-s3-box-3/esp32-s3-box-3.yaml

View workflow job for this annotation

GitHub Actions / yamllint

164:1 [empty-lines] too many blank lines (2 > 1)
speaker:
- platform: esp_adf
- platform: i2s_audio
id: box_speaker
i2s_dout_pin: GPIO15
dac_type: external
sample_rate: 16000
bits_per_sample: 16bit
channel: left
audio_dac: es8311_dac
buffer_duration: 1000ms # The timer finished audio needs to fit entirely in the buffer

micro_wake_word:
models:
Expand All @@ -166,7 +187,6 @@ voice_assistant:
noise_suppression_level: 2
auto_gain: 31dBFS
volume_multiplier: 2.0
vad_threshold: 3
on_listening:
- lambda: id(voice_assistant_phase) = ${voice_assist_listening_phase_id};
- text_sensor.template.publish:
Expand Down Expand Up @@ -255,6 +275,11 @@ voice_assistant:
condition:
switch.is_on: timer_ringing
then:
# Ensure the speaker starts before trying to send the timer finished audio
- lambda: id(box_speaker).start();
- wait_until:
condition:
speaker.is_playing:
- lambda: id(box_speaker).play(id(timer_finished_wave_file), sizeof(id(timer_finished_wave_file)));
- delay: 1s
- wait_until:
Expand Down Expand Up @@ -452,6 +477,12 @@ script:
- lambda: id(voice_assistant_phase) = ${voice_assist_not_ready_phase_id};

switch:
- platform: gpio
name: "Speaker Enable"
pin: GPIO46
restore_mode: RESTORE_DEFAULT_ON
entity_category: config
disabled_by_default: true
- platform: template
name: Mute
id: mute
Expand Down

0 comments on commit 5638ad9

Please sign in to comment.