Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add esp32-s3-box voice assistant configuration #42

Merged
merged 2 commits into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
workflow_dispatch:
pull_request:
schedule:
- cron: '0 5 * * 1'
- cron: "0 5 * * 1"

concurrency:
# yamllint disable-line rule:line-length
Expand Down Expand Up @@ -38,6 +38,9 @@ jobs:
device: pico-w
- firmware: voice-assistant
device: m5stack-atom-echo
- firmware: voice-assistant
device: esp32-s3-box
version: dev

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -86,7 +89,6 @@ jobs:
name: ${{ matrix.project }}
path: manifest.json


full-manifests:
name: Create ${{ matrix.project }} manifest
runs-on: ubuntu-latest
Expand Down
117 changes: 117 additions & 0 deletions voice-assistant/esp32-s3-box.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
esphome:
name: esp32-s3-box
friendly_name: ESP32 S3 Box
platformio_options:
board_build.flash_mode: dio

on_boot:
- priority: -100
then:
- wait_until: api.connected
- delay: 1s
- voice_assistant.start_continuous:
project:
name: esphome.esp32-s3-box-voice-assistant
version: "1.0"
min_version: "2023.9.0-dev"

esp32:
board: esp32s3box
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"

wifi:
ap:

api:
ota:
logger:
hardware_uart: USB_SERIAL_JTAG

binary_sensor:
- platform: gpio
pin:
number: GPIO1
inverted: true
name: "Mute"

- platform: gpio
pin:
number: GPIO0
mode: INPUT_PULLUP
inverted: true
name: Top Left Button
disabled_by_default: true
on_click:
- if:
condition: voice_assistant.is_running
then:
- voice_assistant.stop:
else:
- voice_assistant.start_continuous:

output:
- platform: ledc
pin: GPIO45
id: backlight_output

light:
- platform: monochromatic
output: backlight_output
name: LCD Backlight
id: backlight
restore_mode: ALWAYS_OFF
disabled_by_default: true
default_transition_length: 0s
effects:
- pulse:
transition_length: 250ms
update_interval: 250ms

microphone:
- platform: esp_adf
id: box_mic

speaker:
- platform: esp_adf
id: box_speaker

voice_assistant:
microphone: box_mic
use_wake_word: true
speaker: box_speaker
on_start:
- light.turn_on:
id: backlight
brightness: 100%
on_tts_end:
- light.turn_on:
id: backlight
brightness: 100%
on_end:
- delay: 100ms
- wait_until:
not:
speaker.is_playing:
- light.turn_off: backlight
on_error:
- light.turn_off:
id: backlight

external_components:
- source: github://pr#5230
components: esp_adf
refresh: 0s
- source: github://pr#5229
components:
- voice_assistant
- api
refresh: 0s

psram:
mode: octal
speed: 80MHz