Skip to main content

No project description provided

Project description

Rhasspy Wake Raven Hermes

Implements hermes/hotword functionality from Hermes protocol using Rhasspy Raven.

Requirements

Installation

$ git clone https://github.com/rhasspy/rhasspy-wake-raven-hermes
$ cd rhasspy-wake-raven-hermes
$ ./configure
$ make
$ make install

WAV Templates

Steps to record a custom wake word:

  1. Record yourself saying the wake word at least 3 times
  2. Trim silence around the audio and export 3 WAV files to a directory
    • WAV format should be 16-bit 16Khz mono
  3. Pass --keyword /path/to/directory to rhasspy-wake-raven-hermes with the path to the directory with your WAV templates

You may pass more than one --keyword with different WAV directories. It's recommended that you use --average-templates to reduce CPU usage.

Running

$ bin/rhasspy-wake-raven-hermes <ARGS>

Command-Line Options

usage: rhasspy-wake-raven-hermes [-h] [--keyword KEYWORD [KEYWORD ...]]
                                 [--probability-threshold PROBABILITY_THRESHOLD]
                                 [--distance-threshold DISTANCE_THRESHOLD]
                                 [--minimum-matches MINIMUM_MATCHES]
                                 [--refractory-seconds REFRACTORY_SECONDS]
                                 [--window-shift-seconds WINDOW_SHIFT_SECONDS]
                                 [--dtw-window-size DTW_WINDOW_SIZE]
                                 [--vad-sensitivity {1,2,3}]
                                 [--current-threshold CURRENT_THRESHOLD]
                                 [--max-energy MAX_ENERGY]
                                 [--max-current-ratio-threshold MAX_CURRENT_RATIO_THRESHOLD]
                                 [--silence-method {vad_only,ratio_only,current_only,vad_and_ratio,vad_and_current,all}]
                                 [--average-templates]
                                 [--udp-audio UDP_AUDIO UDP_AUDIO UDP_AUDIO]
                                 [--examples-dir EXAMPLES_DIR]
                                 [--examples-format EXAMPLES_FORMAT]
                                 [--log-predictions] [--host HOST]
                                 [--port PORT] [--username USERNAME]
                                 [--password PASSWORD] [--tls]
                                 [--tls-ca-certs TLS_CA_CERTS]
                                 [--tls-certfile TLS_CERTFILE]
                                 [--tls-keyfile TLS_KEYFILE]
                                 [--tls-cert-reqs {CERT_REQUIRED,CERT_OPTIONAL,CERT_NONE}]
                                 [--tls-version TLS_VERSION]
                                 [--tls-ciphers TLS_CIPHERS]
                                 [--site-id SITE_ID] [--debug]
                                 [--log-format LOG_FORMAT]

optional arguments:
  -h, --help            show this help message and exit
  --keyword KEYWORD [KEYWORD ...]
                        Directory with WAV templates and settings (setting-
                        name=value)
  --probability-threshold PROBABILITY_THRESHOLD
                        Probability above which detection occurs (default:
                        0.5)
  --distance-threshold DISTANCE_THRESHOLD
                        Normalized dynamic time warping distance threshold for
                        template matching (default: 0.22)
  --minimum-matches MINIMUM_MATCHES
                        Number of templates that must match to produce output
                        (default: 1)
  --refractory-seconds REFRACTORY_SECONDS
                        Seconds before wake word can be activated again
                        (default: 2)
  --window-shift-seconds WINDOW_SHIFT_SECONDS
                        Seconds to shift sliding time window on audio buffer
                        (default: 0.02)
  --dtw-window-size DTW_WINDOW_SIZE
                        Size of band around slanted diagonal during dynamic
                        time warping calculation (default: 5)
  --vad-sensitivity {1,2,3}
                        Webrtcvad VAD sensitivity (1-3)
  --current-threshold CURRENT_THRESHOLD
                        Debiased energy threshold of current audio frame
  --max-energy MAX_ENERGY
                        Fixed maximum energy for ratio calculation (default:
                        observed)
  --max-current-ratio-threshold MAX_CURRENT_RATIO_THRESHOLD
                        Threshold of ratio between max energy and current
                        audio frame
  --silence-method {vad_only,ratio_only,current_only,vad_and_ratio,vad_and_current,all}
                        Method for detecting silence
  --average-templates   Average wakeword templates together to reduce number
                        of calculations
  --udp-audio UDP_AUDIO UDP_AUDIO UDP_AUDIO
                        Host/port/siteId for UDP audio input
  --examples-dir EXAMPLES_DIR
                        Save positive example audio to directory as WAV files
  --examples-format EXAMPLES_FORMAT
                        Format of positive example WAV file names using
                        strftime (relative to examples-dir)
  --log-predictions     Log prediction probabilities for each audio chunk
                        (very verbose)
  --host HOST           MQTT host (default: localhost)
  --port PORT           MQTT port (default: 1883)
  --username USERNAME   MQTT username
  --password PASSWORD   MQTT password
  --tls                 Enable MQTT TLS
  --tls-ca-certs TLS_CA_CERTS
                        MQTT TLS Certificate Authority certificate files
  --tls-certfile TLS_CERTFILE
                        MQTT TLS client certificate file (PEM)
  --tls-keyfile TLS_KEYFILE
                        MQTT TLS client key file (PEM)
  --tls-cert-reqs {CERT_REQUIRED,CERT_OPTIONAL,CERT_NONE}
                        MQTT TLS certificate requirements for broker (default:
                        CERT_REQUIRED)
  --tls-version TLS_VERSION
                        MQTT TLS version (default: highest)
  --tls-ciphers TLS_CIPHERS
                        MQTT TLS ciphers to use
  --site-id SITE_ID     Hermes site id(s) to listen for (default: all)
  --debug               Print DEBUG messages to the console
  --log-format LOG_FORMAT
                        Python logger format

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rhasspy-wake-raven-hermes-0.6.0.tar.gz (74.1 kB view details)

Uploaded Source

File details

Details for the file rhasspy-wake-raven-hermes-0.6.0.tar.gz.

File metadata

  • Download URL: rhasspy-wake-raven-hermes-0.6.0.tar.gz
  • Upload date:
  • Size: 74.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.6.9

File hashes

Hashes for rhasspy-wake-raven-hermes-0.6.0.tar.gz
Algorithm Hash digest
SHA256 39b65c97febe07236b8c2b72fbc1972752079c2ece8f41f119f574dc6c60a2d1
MD5 a22a8ec25a3b2b2effb53eccb22df474
BLAKE2b-256 27fee93f37a5180573244146905dd77f604857790485f49106a6605e311d85e1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page