mirror of
https://github.com/esphome/esphome.git
synced 2025-09-02 03:12:20 +01:00
[voice_assistant] voice assistant can configure enabled wake words (#8657)
This commit is contained in:
69
tests/components/voice_assistant/common-idf.yaml
Normal file
69
tests/components/voice_assistant/common-idf.yaml
Normal file
@@ -0,0 +1,69 @@
|
||||
esphome:
|
||||
on_boot:
|
||||
then:
|
||||
- voice_assistant.start
|
||||
- voice_assistant.start_continuous
|
||||
- voice_assistant.stop
|
||||
|
||||
wifi:
|
||||
ssid: MySSID
|
||||
password: password1
|
||||
|
||||
api:
|
||||
|
||||
i2s_audio:
|
||||
i2s_lrclk_pin: ${i2s_lrclk_pin}
|
||||
i2s_bclk_pin: ${i2s_bclk_pin}
|
||||
i2s_mclk_pin: ${i2s_mclk_pin}
|
||||
|
||||
micro_wake_word:
|
||||
id: mww_id
|
||||
on_wake_word_detected:
|
||||
- voice_assistant.start:
|
||||
wake_word: !lambda return wake_word;
|
||||
models:
|
||||
- model: okay_nabu
|
||||
|
||||
microphone:
|
||||
- platform: i2s_audio
|
||||
id: mic_id_external
|
||||
i2s_din_pin: ${i2s_din_pin}
|
||||
adc_type: external
|
||||
pdm: false
|
||||
|
||||
speaker:
|
||||
- platform: i2s_audio
|
||||
id: speaker_id
|
||||
dac_type: external
|
||||
i2s_dout_pin: ${i2s_dout_pin}
|
||||
|
||||
voice_assistant:
|
||||
microphone:
|
||||
microphone: mic_id_external
|
||||
gain_factor: 4
|
||||
channels: 0
|
||||
speaker: speaker_id
|
||||
micro_wake_word: mww_id
|
||||
conversation_timeout: 60s
|
||||
on_listening:
|
||||
- logger.log: "Voice assistant microphone listening"
|
||||
on_start:
|
||||
- logger.log: "Voice assistant started"
|
||||
on_stt_end:
|
||||
- logger.log:
|
||||
format: "Voice assistant STT ended with result %s"
|
||||
args: [x.c_str()]
|
||||
on_tts_start:
|
||||
- logger.log:
|
||||
format: "Voice assistant TTS started with text %s"
|
||||
args: [x.c_str()]
|
||||
on_tts_end:
|
||||
- logger.log:
|
||||
format: "Voice assistant TTS ended with url %s"
|
||||
args: [x.c_str()]
|
||||
on_end:
|
||||
- logger.log: "Voice assistant ended"
|
||||
on_error:
|
||||
- logger.log:
|
||||
format: "Voice assistant error - code %s, message: %s"
|
||||
args: [code.c_str(), message.c_str()]
|
@@ -5,4 +5,4 @@ substitutions:
|
||||
i2s_din_pin: GPIO3
|
||||
i2s_dout_pin: GPIO2
|
||||
|
||||
<<: !include common.yaml
|
||||
<<: !include common-idf.yaml
|
||||
|
@@ -5,4 +5,4 @@ substitutions:
|
||||
i2s_din_pin: GPIO13
|
||||
i2s_dout_pin: GPIO12
|
||||
|
||||
<<: !include common.yaml
|
||||
<<: !include common-idf.yaml
|
||||
|
Reference in New Issue
Block a user