-
Notifications
You must be signed in to change notification settings - Fork 0
/
voice-kit-sample-collection.yaml
234 lines (202 loc) · 5.32 KB
/
voice-kit-sample-collection.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
substitutions:
wake_word_collector_server_ip: "<HA SERVER IP ADDRESS>"
esphome:
name: esphome-voice-kit
friendly_name: ESPHome Voice Kit Sample Collector
name_add_mac_suffix: true
platformio_options:
board_build.flash_mode: dio
project:
name: esphome.voice-kit
version: dev
esp32:
board: esp32-s3-devkitc-1
variant: esp32s3
flash_size: 8MB
framework:
type: esp-idf
version: recommended
sdkconfig_options:
CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240: "y"
CONFIG_ESP32S3_DATA_CACHE_64KB: "y"
CONFIG_ESP32S3_DATA_CACHE_LINE_64B: "y"
CONFIG_ESP32S3_INSTRUCTION_CACHE_32KB: "y"
CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY: "y"
CONFIG_FREERTOS_USE_TRACE_FACILITY: "y"
CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS: "y"
CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP: "y"
# Settings based on https://github.com/espressif/esp-adf/issues/297#issuecomment-783811702
CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM: "16"
CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM: "512"
CONFIG_ESP32_WIFI_STATIC_TX_BUFFER: "y"
CONFIG_ESP32_WIFI_TX_BUFFER_TYPE: "0"
CONFIG_ESP32_WIFI_STATIC_TX_BUFFER_NUM: "8"
CONFIG_ESP32_WIFI_CACHE_TX_BUFFER_NUM: "32"
CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED: "y"
CONFIG_ESP32_WIFI_TX_BA_WIN: "16"
CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED: "y"
CONFIG_ESP32_WIFI_RX_BA_WIN: "32"
CONFIG_LWIP_MAX_ACTIVE_TCP: "16"
CONFIG_LWIP_MAX_LISTENING_TCP: "16"
CONFIG_TCP_MAXRTX: "12"
CONFIG_TCP_SYNMAXRTX: "6"
CONFIG_TCP_MSS: "1436"
CONFIG_TCP_MSL: "60000"
CONFIG_TCP_SND_BUF_DEFAULT: "5840"
CONFIG_TCP_WND_DEFAULT: "65535" # Adjusted from linked settings to avoid compilation error
CONFIG_TCP_RECVMBOX_SIZE: "512"
CONFIG_TCP_QUEUE_OOSEQ: "y"
CONFIG_TCP_OVERSIZE_MSS: "y"
CONFIG_LWIP_WND_SCALE: "y"
CONFIG_TCP_RCV_SCALE: "3"
CONFIG_LWIP_TCPIP_RECVMBOX_SIZE: "512"
CONFIG_BT_ALLOCATION_FROM_SPIRAM_FIRST: "y"
CONFIG_BT_BLE_DYNAMIC_ENV_MEMORY: "y"
wifi:
ssid: "<WIFI SSID>"
password: "<WIFI PASSWORD>"
on_connect:
- micro_wake_word.start:
logger:
level: DEBUG
logs:
sensor: WARN # avoids logging debug sensor updates
api:
ota:
- platform: esphome
id: ota_esphome
improv_serial:
esp32_improv:
authorizer: center_button
i2c:
sda: GPIO5
scl: GPIO6
psram:
mode: octal
speed: 80MHz
binary_sensor:
# Center Button. Used for many things (See on_multi_click)
- platform: gpio
id: center_button
pin:
number: GPIO0
inverted: true
switch:
# Remove before production
- platform: template
name: "Upload wake word sample"
restore_mode: RESTORE_DEFAULT_OFF
turn_on_action:
- lambda: id(mww).set_upload_status(true);
turn_off_action:
- lambda: id(mww).set_upload_status(false);
optimistic: true
light:
# Hardware LED ring. Not used because remapping needed
- platform: esp32_rmt_led_strip
id: leds_internal
pin: GPIO21
rmt_channel: 1
num_leds: 12
rgb_order: GRB
chipset: WS2812
default_transition_length: 0ms
power_supply: led_power
# Voice Assistant LED ring. Remapping of the internal LED.
# This light is not exposed. The device controls it
- platform: partition
id: voice_assistant_leds
internal: true
default_transition_length: 0ms
segments:
- id: leds_internal
from: 7
to: 11
- id: leds_internal
from: 0
to: 6
# User facing LED ring. Remapping of the internal LEDs.
# Exposed to be used by the user.
- platform: partition
id: led_ring
name: LED Ring
entity_category: config
icon: "mdi:circle-outline"
default_transition_length: 0ms
restore_mode: RESTORE_DEFAULT_OFF
segments:
- id: leds_internal
from: 7
to: 11
- id: leds_internal
from: 0
to: 6
power_supply:
- id: led_power
pin: GPIO45
sensor:
# To be removed before launch
- platform: debug
free:
name: "Heap Free"
block:
name: "Max Block Free"
loop_time:
name: "Loop Time"
psram:
name: "PSRAM Free"
i2s_audio:
- id: i2s_input
i2s_lrclk_pin:
number: GPIO14
i2s_bclk_pin:
number: GPIO13
microphone:
- platform: nabu_microphone
i2s_din_pin: GPIO15
i2s_mode: secondary
adc_type: external
id: parent_microphone
pdm: false
sample_rate: 16000
bits_per_sample: 32bit
i2s_audio_id: i2s_input
channel_0:
id: asr_mic
amplify_shift: 0
channel_1:
id: comm_mic
amplify_shift: 2
external_components:
- source:
type: git
url: https://github.com/esphome/voice-kit
ref: 20240911-mww-sample-ring-buffer
components: [micro_wake_word]
refresh: 0s
- source:
type: git
url: https://github.com/esphome/voice-kit
ref: dev
components:
- audio_dac
- microphone
- nabu_microphone
- voice_assistant
- voice_kit
refresh: 0s
voice_kit:
reset_pin: GPIO4
firmware:
url: https://github.com/esphome/voice-kit-xmos-firmware/releases/download/v1.3.1/ffva_v1.3.1_upgrade.bin
version: "1.3.1"
md5: 964635c5bf125529dab14a2472a15401
micro_wake_word:
id: mww
upload_host: ${wake_word_collector_server_ip}
models:
- model: okay_nabu
vad:
microphone: comm_mic
debug:
update_interval: 5s