Skip to content

Commit

Permalink
Update to 1.5.0 and streamline options
Browse files Browse the repository at this point in the history
  • Loading branch information
synesthesiam committed Sep 26, 2023
1 parent b84a4d8 commit f786bc8
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 62 deletions.
7 changes: 7 additions & 0 deletions openwakeword/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## 1.5.0

- Remove webrtc (done in core now)
- Remove audio options related to webrtc
- Remove wake word option (dynamic loading)
- Dynamically load wake word models

## 1.4.0

- Add noise suppression/auto gain with webrtc
Expand Down
32 changes: 0 additions & 32 deletions openwakeword/DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,6 @@ for more information.

## Configuration

### Option: `model`

Name of wake word model to use. Available models are:

* `ok_nabu` (default)
* `hey_jarvis`
* `alexa`
* `hey_mycroft`
* `hey_rhasspy`

### Option: `threshold`

Activation threshold (0-1), where higher means fewer activations. See trigger
Expand All @@ -42,28 +32,6 @@ level for the relationship between activations and wake word detections.
Number of activations before a detection is registered. A higher trigger level
means fewer detections.

### Option: `noise_suppression`

Noise suppression level with
[webrtc](https://github.com/rhasspy/webrtc-noise-gain), where 0 is disabled
(default) and 4 is the max. Suppresses common sources of noise, such as fans,
but may distort audio. This should be used for low quality microphones, or in
noisy environments where noise suppression is not available on the voice
satellite.

### Option: `auto_gain`

Automatic gain control target dBFS with
[webrtc](https://github.com/rhasspy/webrtc-noise-gain), where 0 is disabled
(default) and 31 is the max. Raises the volume when someone is speaking too
quietly, but may distort audio. This should be used for low quality microphones,
or if the voice satellite is far away and does not have auto-gain functionality.

### Option: `save_audio`

Enable recording of audio to `/share/openwakeword` as WAV files.
**WARNING**: All audio is saved, including before the wake word is spoken, so this option should be disabled to preserve disk space.

### Option: `debug_logging`

Enable debug logging. Useful for seeing satellite connections and each wake word detection in the logs.
Expand Down
2 changes: 1 addition & 1 deletion openwakeword/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RUN \
setuptools \
wheel \
&& pip3 install --no-cache-dir \
"wyoming-openwakeword[webrtc]==${OPENWAKEWORD_LIB_VERSION}" \
"wyoming-openwakeword==${OPENWAKEWORD_LIB_VERSION}" \
\
&& rm -rf /var/lib/apt/lists/*

Expand Down
2 changes: 1 addition & 1 deletion openwakeword/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:
OPENWAKEWORD_LIB_VERSION: 1.4.0
OPENWAKEWORD_LIB_VERSION: 1.5.0
11 changes: 1 addition & 10 deletions openwakeword/config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
version: 1.4.0
version: 1.5.0
slug: openwakeword
name: openWakeWord
description: openWakeWord using the Wyoming protocol
Expand All @@ -15,22 +15,13 @@ backup_exclude:
map:
- share:rw
options:
model: "ok_nabu"
threshold: 0.5
trigger_level: 1
noise_suppression: 0
auto_gain: 0
debug_logging: false
save_audio: false
schema:
model: |
list(ok_nabu|alexa|hey_jarvis|hey_mycroft|hey_rhasspy)
threshold: float
trigger_level: int
noise_suppression: int
auto_gain: int
debug_logging: bool
save_audio: bool
ports:
"10400/tcp": null
homeassistant: 2023.9.0.dev20230809
15 changes: 7 additions & 8 deletions openwakeword/rootfs/etc/s6-overlay/s6-rc.d/openwakeword/run
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ if bashio::config.true 'debug_logging'; then
flags+=('--debug')
fi

if bashio::config.true 'save_audio'; then
flags+=('--output-dir' '/share/openwakeword')
fi

exec python3 -m wyoming_openwakeword \
--uri 'tcp://0.0.0.0:10400' \
--model "$(bashio::config 'model')" \
--model 'ok_nabu' \
--model 'hey_jarvis' \
--model 'hey_rhasspy' \
--model 'hey_mycroft' \
--model 'alexa' \
--preload-model 'ok_nabu' \
--threshold "$(bashio::config 'threshold')" \
--trigger-level "$(bashio::config 'trigger_level')" \
--noise-suppression "$(bashio::config 'noise_suppression')" \
--auto-gain "$(bashio::config 'auto_gain')" ${flags[@]}
--trigger-level "$(bashio::config 'trigger_level')" ${flags[@]}
10 changes: 0 additions & 10 deletions openwakeword/translations/en.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
---
configuration:
model:
name: Model
description: >-
Wake word model to use.
threshold:
name: Threshold
description: >-
Expand All @@ -15,12 +11,6 @@ configuration:
description: >-
Number of activations before a detection is registered. A higher trigger
level means fewer detections.
noise_suppression:
name: Noise suppression
description: >-
Enable noise suppression using speexdsp. This should be used for low
quality microphones, or in noisy environments where noise suppression is
not available on the voice satellite.
debug_logging:
name: Debug logging
description: >-
Expand Down

0 comments on commit f786bc8

Please sign in to comment.