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

Continued-conversation for esp32-s3-box-3 #173

Closed
wants to merge 85 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
c3fe868
Update esp32-s3-box-3.yaml
jaymunro Feb 24, 2024
4e5fc75
Update esp32-s3-box-3.yaml
jaymunro Feb 25, 2024
c7fd15b
Update esp32-s3-box-3.yaml
jaymunro Feb 25, 2024
5841397
Update esp32-s3-box-3.yaml
jaymunro Feb 25, 2024
b043f1b
Update esp32-s3-box-3.yaml
jaymunro Feb 25, 2024
73100c0
Update esp32-s3-box-3.yaml
jaymunro Feb 25, 2024
4170481
Update esp32-s3-box-3.yaml
jaymunro Feb 25, 2024
48abd5b
Update esp32-s3-box-3.yaml
jaymunro Feb 25, 2024
bf9b17a
Update esp32-s3-box-3.yaml
jaymunro Feb 26, 2024
20822d5
Update esp32-s3-box-3.yaml
jaymunro Feb 26, 2024
14f2267
Update esp32-s3-box-3.yaml
jaymunro Feb 26, 2024
a050666
Update esp32-s3-box-3.yaml
jaymunro Feb 26, 2024
92fbcee
Added debug code
jaymunro Feb 29, 2024
6f0bdc8
Merge branch 'esphome:main' into continuous-conversation
jaymunro Feb 29, 2024
f0cee73
Add configurable "Continuous timeout" and text to display.
jaymunro Mar 2, 2024
1d38fcf
Add Continued consersation ability, text prompts & feedback (with sen…
jaymunro Mar 3, 2024
09576cb
Update wake word display prompt to a substitution
jaymunro Mar 3, 2024
efc45d8
Tidy up and tweaks
jaymunro Mar 4, 2024
b5bad40
timeout on wait_until added
jaymunro Mar 4, 2024
f9df35e
More detail on gebug logging for quick return to idle
jaymunro Mar 4, 2024
73f8a1b
Added glyphs for Slovenian, Danish, French, Spanish, German
jaymunro Mar 5, 2024
b9b31a3
Resolved condition where wake word was needed two times on boot befor…
jaymunro Mar 5, 2024
37b429c
Added glyphs for all possible European languages.
jaymunro Mar 5, 2024
f5ab282
Add method to select date and time formats separately
jaymunro Mar 5, 2024
145a261
Added 'Weekday only' option as a date format.
jaymunro Mar 5, 2024
6426f42
Add facility for user to modify text prompts to their own language.
jaymunro Mar 6, 2024
a4bdf93
Fix to default text substitutions and prep for new wake_work push to …
jaymunro Mar 7, 2024
b10c125
linting
jaymunro Mar 7, 2024
ae4d66d
liniting
jaymunro Mar 7, 2024
d692fc3
liniting
jaymunro Mar 7, 2024
9db7650
Fixed a default accidentally left changed.
jaymunro Mar 7, 2024
8db988e
Code change to allow for a "visually" stuck screen on first boot afte…
jaymunro Mar 12, 2024
d049413
Add a timeout on a wait condition to prevent an edge case with the sc…
jaymunro Mar 12, 2024
a9d5174
Commented out all debug code to lighten resource usage
jaymunro Mar 13, 2024
45628c5
Adjustment made in commenting that was preventing validation
jaymunro Mar 13, 2024
5abd34f
Merge branch 'main' into continued-conversation
jaymunro Mar 30, 2024
87a048f
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
5c2b740
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
01fdb6c
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
b2c954b
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
92a35cd
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
1aa32af
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
32fb503
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
5f3c27d
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
19869de
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
70d93ea
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
4c8dcce
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
7c63d53
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
45955c4
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
881a013
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
a0d846a
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
261506b
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
69c2524
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
e0cf43c
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
d18dfa9
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
4347cfb
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
9125b74
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
f9943ba
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
11508d8
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
5474921
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
6228e96
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
7b2c6a7
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
300d277
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
09652b7
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
0c4a23b
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
b77a833
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
ef29da7
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
332c23f
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
f82e4e9
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
fb763fa
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
ed2216a
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
1491d8a
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
beaea73
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
1f65373
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
363c054
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
8718338
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
789247e
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
fdd9472
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
199b4da
Merge pull request #2 from jaymunro/jaymunro-test-1
jaymunro Mar 30, 2024
0c164b9
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
acfe333
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
5000f2d
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
4cf7141
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
ba2a120
Update esp32-s3-box-3.yaml
jaymunro Mar 30, 2024
bad3e73
Update esp32-s3-box-3.yaml
jaymunro Apr 12, 2024
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
Prev Previous commit
Next Next commit
Add configurable "Continuous timeout" and text to display.
jaymunro authored Mar 2, 2024
commit f0cee73a9f6712120d695eac84e3d7af5e16c0af
62 changes: 56 additions & 6 deletions wake-word-voice-assistant/esp32-s3-box-3.yaml
Original file line number Diff line number Diff line change
@@ -232,8 +232,9 @@ voice_assistant:
and:
- switch.is_off: mute
- lambda: return id(wake_word_engine_location).state == "On device";
- lambda: return !(id(voice_assistant_phase) == ${voice_assist_error_phase_id});
then:
- lambda: return id(voice_assistant_phase) == ${voice_assist_listening_phase_id};
then:
- logger.log: "(on_end) Stopping stt_timeout_to_idle"
- script.stop: stt_timeout_to_idle
- logger.log: "(on-end) Waiting for voice_assistant to stop"
- wait_until:
@@ -246,17 +247,28 @@ voice_assistant:
- logger.log: "(on_error) started"
- if:
condition:
lambda: return !id(init_in_progress);
and:
- lambda: return !id(init_in_progress);
- lambda: return !(code == "stt-no-text-recognized");
then:
- lambda: id(voice_assistant_phase) = ${voice_assist_error_phase_id};
- logger.log: "(on_error) Switched to ERROR phase"
- script.execute: draw_display
- delay: 1s
- logger.log: "(on_error) Stopping stt_timeout_to_idle"
- script.stop: stt_timeout_to_idle
- if:
condition:
switch.is_off: mute
then:
- logger.log: "(on_error) Stopping voice_assistant"
- voice_assistant.stop:
- logger.log: "(on_error) Waiting for voice_assistant to stop"
- wait_until:
not:
voice_assistant.is_running:
- logger.log: "(on_error) Starting micro_wake_word"
- micro_wake_word.start:
- logger.log: "(on_error) Switching to IDLE phase"
- lambda: id(voice_assistant_phase) = ${voice_assist_idle_phase_id};
else:
@@ -307,8 +319,10 @@ script:
- id: stt_timeout_to_idle
mode: restart # restart the timer if called before timeout
then:
- logger.log: "(stt_timeout_to_idle) resetting"
- delay: 8s # change this to a configurable number
- logger.log:
format: "(stt_timeout_to_idle) resetting to %.0f seconds"
args: [ id(continuous_timeout).state ]
- delay: !lambda "return id(continuous_timeout).state * 1000;"
- logger.log: "(stt_timeout_to_idle) Stopping voice_assistant"
- voice_assistant.stop:
- logger.log: "(stt_timeout_to_idle) Waiting for voice_assistant to stop"
@@ -427,14 +441,28 @@ switch:
- micro_wake_word.stop
- lambda: id(voice_assistant_phase) = ${voice_assist_muted_phase_id};
- script.execute: draw_display

- platform: template
name: Continuous conversation
id: continuous_conversation
optimistic: true
restore_mode: RESTORE_DEFAULT_OFF
entity_category: config

number:
- platform: template
entity_category: config
name: Continuous timeout
id: continuous_timeout
icon: mdi:clock
optimistic: true
restore_value: true
initial_value: 8
min_value: 1
step: 1
max_value: 10
unit_of_measurement: s
mode: slider

select:
- platform: template
entity_category: config
@@ -522,6 +550,14 @@ image:
type: RGB24
use_transparency: true

font:
- file:
type: gfonts
family: Roboto
weight: 300
id: font_roboto_16
size: 16

color:
- id: idle_color
hex: ${idle_illustration_background_color}
@@ -540,6 +576,15 @@ spi:
clk_pin: 7
mosi_pin: 6

time:
- platform: sntp
id: the_time
on_time:
- cron: 0 * * * * *
then:
- logger.log: "(on_time) Updating time display"
- script.execute: draw_display

display:
- platform: ili9xxx
id: s3_box_lcd
@@ -556,14 +601,18 @@ display:
lambda: |-
it.fill(id(idle_color));
it.image((it.get_width() / 2), (it.get_height() / 2), id(casita_idle), ImageAlign::CENTER);
it.print( 10, 10, id(font_roboto_16), Color::WHITE, "Say \"Hey Jarvis\"" );
it.strftime( it.get_width() / 2, it.get_height() - 10, id(font_roboto_16), Color::WHITE, TextAlign::BOTTOM_CENTER, "%a %d %b, %Y - %I:%M %p", id(the_time).now() );
- id: listening_page
lambda: |-
it.fill(id(listening_color));
it.image((it.get_width() / 2), (it.get_height() / 2), id(casita_listening), ImageAlign::CENTER);
it.print( 10, 10, id(font_roboto_16), Color::BLACK, "How can I help?" );
- id: thinking_page
lambda: |-
it.fill(id(thinking_color));
it.image((it.get_width() / 2), (it.get_height() / 2), id(casita_thinking), ImageAlign::CENTER);
it.print( 10, 10, id(font_roboto_16), Color::BLACK, "I heard you." );
- id: replying_page
lambda: |-
it.fill(id(replying_color));
@@ -582,6 +631,7 @@ display:
lambda: |-
it.fill(id(loading_color));
it.image((it.get_width() / 2), (it.get_height() / 2), id(casita_initializing), ImageAlign::CENTER);
it.print( 10, 10, id(font_roboto_16), Color::WHITE, "Starting up..." );
- id: muted_page
lambda: |-
it.fill(Color::BLACK);