[rustpotterks] Upgrade to version 2 (#14615)
* [rustpotter] Use version 2 Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
This commit is contained in:
@@ -5,6 +5,11 @@ This voice service allows you to use the open source library Rustpotter as your
|
||||
|
||||
Rustpotter provides personal on-device wake word detection. You need to generate a model for your keyword using audio samples.
|
||||
|
||||
You can test library in your browser using these web pages:
|
||||
|
||||
- [The spot demo](https://givimad.github.io/rustpotter-worklet-demo/), which include some example wakewords (but it's recommended to use your own).
|
||||
- [The model creation demo](https://givimad.github.io/rustpotter-create-model-demo/), it allows you to record compatible wav files and generate a wakeword file that you can test on the previous page.
|
||||
|
||||
Important: No voice data listened by this service will be uploaded to the Cloud.
|
||||
The voice data is processed offline, locally on your openHAB server by Rustpotter.
|
||||
|
||||
@@ -12,17 +17,19 @@ The voice data is processed offline, locally on your openHAB server by Rustpotte
|
||||
|
||||
After installing, you will be able to access the service options through the openHAB configuration page in UI (**Settings / Other Services - Rustpotter Keyword Spotter**) to edit them:
|
||||
|
||||
* **Threshold** - Configures the detector threshold, is the min score (in range 0. to 1.) that some wake word template should obtain to trigger a detection. Defaults to 0.5.
|
||||
* **Averaged Threshold** - Configures the detector averaged threshold, is the min score (in range 0. to 1.) that the audio should obtain against a combination of the wake word templates, the detection will be aborted if this is not the case. This way it can prevent to run the comparison of the current frame against each of the wake word templates which saves cpu. If set to 0 this functionality is disabled.
|
||||
* **Eager mode** - Enables eager mode. End detection as soon as a result is over the score, instead of waiting to see if the next frame has a higher score.
|
||||
* **Noise Detection Mode** - Use build-in noise detection to reduce computation on absence of noise. Configures the difficulty to consider a frame as noise (the required noise level).
|
||||
* **Noise Detection Sensitivity** - Noise/silence ratio in the last second to consider noise is detected. Defaults to 0.5.
|
||||
* **VAD Mode** - Use a voice activity detector to reduce computation in the absence of vocal sound.
|
||||
* **VAD Sensitivity** - Voice/silence ratio in the last second to consider voice is detected.
|
||||
* **VAD Delay** - Seconds to disable the vad detector after voice is detected. Defaults to 3.
|
||||
* **Comparator Ref** - Configures the reference for the comparator used to match the samples.
|
||||
* **Comparator Band Size** - Configures the band-size for the comparator used to match the samples.
|
||||
|
||||
- **Threshold** - Configures the detector threshold, is the min score (in range 0. to 1.) that some wake word template should obtain to trigger a detection. Defaults to 0.5.
|
||||
- **Averaged Threshold** - Configures the detector averaged threshold, is the min score (in range 0. to 1.) that the audio should obtain against a combination of the wake word templates, the detection will be aborted if this is not the case. This way it can prevent to run the comparison of the current frame against each of the wake word templates which saves cpu. If set to 0 this functionality is disabled.
|
||||
- **Score Mode** - Indicates how to calculate the final score.
|
||||
- **Min Scores** - Minimum number of positive scores to consider a partial detection as a detection.
|
||||
- **Comparator Ref** - Configures the reference for the comparator used to match the samples.
|
||||
- **Comparator Band Size** - Configures the band-size for the comparator used to match the samples.
|
||||
- **Gain Normalizer** - Enables an audio filter that intent to approximate the volume of the stream to a reference level.
|
||||
- **Min Gain** - Min gain applied by the gain normalizer filter.
|
||||
- **Max Gain** - Max gain applied by the gain normalizer filter.
|
||||
- **Gain Ref** - The RMS reference used by the gain-normalizer to calculate the gain applied. If unset an estimation of the wakeword level is used.
|
||||
- **Band Pass** - Enables an audio filter that attenuates frequencies outside the low cutoff and high cutoff range.
|
||||
- **Low Cutoff** - Low cutoff for the band-pass filter.
|
||||
- **High Cutoff** - High cutoff for the band-pass filter.
|
||||
|
||||
In case you would like to setup the service via a text file, create a new file in `$OPENHAB_ROOT/conf/services` named `rustpotterks.cfg`
|
||||
|
||||
@@ -31,21 +38,24 @@ Its contents should look similar to:
|
||||
```
|
||||
org.openhab.voice.rustpotterks:threshold=0.5
|
||||
org.openhab.voice.rustpotterks:averagedthreshold=0.2
|
||||
org.openhab.voice.rustpotterks:scoreMode=max
|
||||
org.openhab.voice.rustpotterks:minScores=5
|
||||
org.openhab.voice.rustpotterks:comparatorRef=0.22
|
||||
org.openhab.voice.rustpotterks:comparatorBandSize=6
|
||||
org.openhab.voice.rustpotterks:eagerMode=true
|
||||
org.openhab.voice.rustpotterks:noiseDetectionMode=hard
|
||||
org.openhab.voice.rustpotterks:noiseDetectionSensitivity=0.5
|
||||
org.openhab.voice.rustpotterks:vadMode=aggressive
|
||||
org.openhab.voice.rustpotterks:vadSensitivity=0.5
|
||||
org.openhab.voice.rustpotterks:vadDelay=3
|
||||
org.openhab.voice.rustpotterks:comparatorBandSize=5
|
||||
org.openhab.voice.rustpotterks:gainNormalizer=true
|
||||
org.openhab.voice.rustpotterks:minGain=0.5
|
||||
org.openhab.voice.rustpotterks:maxGain=1
|
||||
org.openhab.voice.rustpotterks:gainRef=
|
||||
org.openhab.voice.rustpotterks:bandPass=true
|
||||
org.openhab.voice.rustpotterks:lowCutoff=80
|
||||
org.openhab.voice.rustpotterks:highCutoff=400
|
||||
```
|
||||
|
||||
## Magic Word Configuration
|
||||
|
||||
The magic word to spot is gathered from your 'Voice' configuration.
|
||||
|
||||
You can generate your own wake word model by using the [Rustpotter CLI](https://github.com/GiviMAD/rustpotter-cli).
|
||||
You can generate your own wakeword files using the [Rustpotter CLI](https://github.com/GiviMAD/rustpotter-cli).
|
||||
|
||||
You can also download the models used as examples on the [rustpotter web demo](https://givimad.github.io/rustpotter-worklet-demo/) from [this folder](https://github.com/GiviMAD/rustpotter-worklet-demo/tree/main/static).
|
||||
|
||||
@@ -59,11 +69,11 @@ The service will only work if it's able to find the correct rpw for your magic w
|
||||
|
||||
You can setup your preferred default keyword spotter and default magic word in the UI:
|
||||
|
||||
* Go to **Settings**.
|
||||
* Edit **System Services - Voice**.
|
||||
* Set **Rustpotter Keyword Spotter** as **Default Keyword Spotter**.
|
||||
* Choose your preferred **Magic Word** for your setup.
|
||||
* Choose optionally your **Listening Switch** item that will be switch ON during the period when the dialog processor has spotted the keyword and is listening for commands.
|
||||
- Go to **Settings**.
|
||||
- Edit **System Services - Voice**.
|
||||
- Set **Rustpotter Keyword Spotter** as **Default Keyword Spotter**.
|
||||
- Choose your preferred **Magic Word** for your setup.
|
||||
- Choose optionally your **Listening Switch** item that will be switch ON during the period when the dialog processor has spotted the keyword and is listening for commands.
|
||||
|
||||
In case you would like to setup these settings via a text file, you can edit the file `runtime.cfg` in `$OPENHAB_ROOT/conf/services` and set the following entries:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user