Skip to content

Commit

Permalink
Add support for timers in Assist Microphone (#3892)
Browse files Browse the repository at this point in the history
* Bump Wyoming Satellite version to 1.3.0

Bump to add support for timers via new wyoming cli arguments

* Add timer_wav to the config.yaml

* Add --timer-finished-wav-repeat flag

* Add timer repeat and delay config fields

* Adjust timer_finished.wav filename

* Config parameter adjustment

* Add timer_finished.wav

* adjust timer_finished_wav parameter usage

* fixing schema parameter

* Bump addon version to 1.3.0

* Update Assist Microphone Documentation

Add docs for new timer configuration options

* Update CHANGELOG.md

* Add field description translations for new arguments
  • Loading branch information
mr-ransel authored Jan 17, 2025
1 parent fabb9a8 commit 09b61a1
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 2 deletions.
5 changes: 5 additions & 0 deletions assist_microphone/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 1.3.0

- Update to wyoming-satellite 1.3.0 to get support for timers
- Added configuration options for setting timer sound, repetitions and delay

## 1.2.0

- Update to wyoming-satellite 1.2.0
Expand Down
12 changes: 12 additions & 0 deletions assist_microphone/DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,18 @@ Path to WAV file to play when wake word is detected (empty to disable, default i

Path to WAV file to play when voice command is finished (empty to disable, default is `/usr/src/sounds/done.wav`).

### Option: `timer_finished_wav`

Path to WAV file to play when timer is finished (empty to disable, default is `/usr/src/sounds/timer_finished.wav`).

### Option: `timer_repeat_count`

Number of times to repeat `timer_finished_wav` (default is 3).

### Option: `timer_repeat_delay`

Delay before repeating `timer_finished_wav`, in seconds (default is 0.75).

### Option: `noise_suppression`

Noise suppression level (0 is disabled, 4 is max). Disabled by default.
Expand Down
2 changes: 1 addition & 1 deletion assist_microphone/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ codenotary:
signer: [email protected]
base_image: [email protected]
args:
WYOMING_SATELLITE_VERSION: 1.2.0
WYOMING_SATELLITE_VERSION: 1.3.0
8 changes: 7 additions & 1 deletion assist_microphone/config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
version: 1.2.0
version: 1.3.0
slug: assist_microphone
name: Assist Microphone
description: Use Assist with local microphone
Expand All @@ -16,6 +16,9 @@ map:
options:
awake_wav: "/usr/src/sounds/awake.wav"
done_wav: "/usr/src/sounds/done.wav"
timer_finished_wav: "/usr/src/sounds/timer_finished.wav"
timer_repeat_count: 3
timer_repeat_delay: 0.75
sound_enabled: true
noise_suppression: 0
auto_gain: 0
Expand All @@ -25,6 +28,9 @@ options:
schema:
awake_wav: str
done_wav: str
timer_finished_wav: str
timer_repeat_count: int
timer_repeat_delay: float
sound_enabled: bool
noise_suppression: int
auto_gain: int
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ exec python3 -m wyoming_satellite \
--snd-command-rate 16000 \
--awake-wav "$(bashio::config 'awake_wav')" \
--done-wav "$(bashio::config 'done_wav')" \
--timer-finished-wav "$(bashio::config 'timer_finished_wav')" \
--timer-finished-wav-repeat "$(bashio::config 'timer_repeat_count')" "$(bashio::config 'timer_repeat_delay')" \
--mic-volume-multiplier "$(bashio::config 'mic_volume_multiplier')" \
--snd-volume-multiplier "$(bashio::config 'sound_volume_multiplier')" \
--mic-auto-gain "$(bashio::config 'auto_gain')" \
Expand Down
Binary file added assist_microphone/sounds/timer_finished.wav
Binary file not shown.
13 changes: 13 additions & 0 deletions assist_microphone/translations/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,19 @@ configuration:
description: >-
Path to WAV file to play when voice command is finished (empty to
disable).
timer_finished_wav:
name: Timer Finished WAV
description: >-
Path to WAV file to play when timer is finished (empty to disable,
default is /usr/src/sounds/timer_finished.wav).
timer_repeat_count:
name: Timer Finished WAV Repetition Count
description: >-
Number of times to repeat timer_finished_wav (default is 3).
timer_repeat_delay:
name: Timer Repetition Delay
description: >-
Delay before repeating timer_finished_wav, in seconds (default is 0.75).
noise_suppression:
name: Noise suppression
description: >-
Expand Down

0 comments on commit 09b61a1

Please sign in to comment.