Coder Social home page Coder Social logo

synesthesiam / rhasspy Goto Github PK

View Code? Open in Web Editor NEW
941.0 38.0 101.0 13.58 MB

Rhasspy voice assistant for offline home automation

Home Page: https://rhasspy.readthedocs.io

License: MIT License

Makefile 0.10% Python 20.24% JavaScript 13.79% Shell 2.43% CSS 1.82% HTML 57.84% Vue 3.70% Dockerfile 0.09%
voice-assistant speech-recognition home-assistant hassio intent-recognition german spanish french italian dutch

rhasspy's Introduction

This repository contains code for an older version of Rhasspy (2.4).


Rhasspy (pronounced RAH-SPEE) is an offline voice assistant toolkit inspired by Jasper that supports many languages. It works well with Home Assistant, Hass.io, and Node-RED.

A newer version of Rhasspy (2.5) is available at https://github.com/rhasspy/rhasspy

Rhasspy transcribes voice commands into JSON events that can trigger actions in home automation software, like Home Assistant automations or Node-RED flows. You define custom voice commands in a profile using a specialized template syntax, and Rhasspy takes care of the rest.

To run Rhasspy with the English (en) profile using Docker:

docker run -d -p 12101:12101 \
      --restart unless-stopped \
      -v "$HOME/.config/rhasspy/profiles:/profiles" \
      --device /dev/snd:/dev/snd \
      synesthesiam/rhasspy-server:latest \
      --profile en \
      --user-profiles /profiles

Then visit the web interface at http://localhost:12101 See the web interface documentation for a brief tour of what you can do.

Supported Languages

Rhasspy currently supports the following languages:

  • English (en)
  • German (de)
  • Spanish (es)
  • French (fr)
  • Italian (it)
  • Dutch (nl)
  • Russian (ru)
  • Greek (el)
  • Hindi (hi)
  • Mandarin (zh)
  • Vietnamese (vi)
  • Portuguese (pt)
  • Swedish (sv)
  • Catalan (ca)

The table below summarizes language support across the various supporting technologies that Rhasspy uses:

Category Name Offline? en de es fr it nl ru el hi zh vi pt sv ca
Wake Word pocketsphinx
porcupine
snowboy requires account
precise
Speech to Text pocketsphinx
kaldi
Intent Recognition fsticuffs
fuzzywuzzy
adapt
flair
rasaNLU needs extra software
Text to Speech espeak
flite
picotts
marytts
wavenet

• - yes, but requires training/customization

For more information, please see the documentation.

Intended Audience

Rhasspy is intended for advanced users that want to have a voice interface to Home Assistant, but value privacy and freedom above all else. There are many other voice assistants, but none (to my knowledge) that:

  1. Can function completely disconnected from the Internet
  2. Are entirely free/open source
  3. Work well with Home Assistant, Hass.io, and Node-RED

If you feel comfortable sending your voice commands through the Internet for someone else to process, or are not comfortable with rolling your own Home Assistant automations to handle intents, I recommend taking a look at Mycroft.

Contributing

For users who are also coders, pull requests for bug fixes or new components are always welcome and much appreciated!

If you can speak/write one of the supported languages, I would love to hear your feedback about that language's profile. I only speak English, so I rely on users of Rhasspy (and Google Translate) to help me write example sentences and create test WAV files.

rhasspy's People

Contributors

0x326 avatar alexkn avatar daniele-athome avatar dependabot[bot] avatar devkid avatar drhirn avatar esdeboer avatar frkos avatar jasonhildebrand avatar koenvervloesem avatar kroka avatar mathquis avatar maxbachmann avatar mic92 avatar mironov avatar mzoeller avatar pheelee avatar romkabouter avatar synesthesiam avatar tooa avatar underscorephil avatar xlava avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rhasspy's Issues

[Feature] Support slot types

How can we handle slot types similar to Snips' ?

  • number
  • percent
  • date, time and datetime
  • duration
  • temperature
  • ordinal

DeepSpeech support

In light of DeepSpeech 0.6 being released today, I'd like to try and add support for DeepSpeech as an alternative speech to text engine in Rhasspy.

Duplication of "bedroom light" in text for "turn the bedroom light on"

This is on a clean install of Rhasspy in a virtual environment:

Relevant part of sentences.ini:

[ChangeLightState]
light_name = (living room lamp | garage light | <ChangeLightColor.light_name>) {name}
light_state = (on | off) {state}

turn <light_state> [the] <light_name>
turn [the] <light_name> <light_state>

[ChangeLightColor]
light_name = (bedroom light) {name}
color = (red | green | blue) {color}

set [the] <light_name> [to] <color>
make [the] <light_name> <color>

Go to Sentences tab, enter "turn the bedroom light on", click on Get Intent.

Result:

"text": "turn the bedroom light bedroom light on"

The duplication of "bedroom light" doesn't happen in "turn the living room lamp on". This has probably something to do with the fact that "bedroom light" is referred to by <ChangeLightColor.light_name> in the rule light_name in the intent SetLightState.

The same happens in Dutch.

Cannot train after setting up RASA container

Trying to test out the Rasa NLU intent recognition.
I followed the instructions on Rasa sight and got the container up and going.
If I navigate to port 5005 on the host, I get:
Hello from Rasa: 1.6.0a1
So I think I got it working correctly.

But when I try to train in Rhasspy after changing the intent recognizer to Rasa (and setting the IP/port) I get this:

[ERROR:65466427] __main__: Training failed: JSONDecodeError('Expecting value: line 1 column 1 (char 0)',)
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/quart/app.py", line 1471, in full_dispatch_request
    result = await self.dispatch_request(request_context)
  File "/usr/local/lib/python3.6/dist-packages/quart/app.py", line 1519, in dispatch_request
    return await handler(**request_.view_args)
  File "app.py", line 514, in api_train
    raise Exception(f"Training failed: {result.reason}")
Exception: Training failed: JSONDecodeError('Expecting value: line 1 column 1 (char 0)',)

I haven't looking into the code yet to see if I understand what the issue is, but hope to later this week (I'm a novice though). Creating the issue here so if someone more capable has time to look, they can fix it or tell me what I am doing wrong :-).

If there is more information I can supply let me know.

Cheers!
DeadEnd

Self-signed SSL Cert on Home Assistant instance prevents Rhasspy from connecting

If your HA instance is secured with a self-signed SSL cert (as mine is) then rhasspy will throw an error when you ask it to parse an intent and send it to Home Assistant:

HTTPSConnectionPool(host='home-assistant.local', port=443): Max retries exceeded with url: /api/events/rhasspy_ChangeInput (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)'),))

Support for TTS via Hermes/MQTT

It would be nice if rhasspy could also use Hermes protocol for speaking text.

Actual use-case for me would be the usage of AWS Polly for TTS.
The Python script below listens for Hermes TTS "say" command plays the returned "WAV" data via Hermes Audio Server protocol:
https://github.com/hcooper/snips-tts-polly

  • subscribes to hermes/tts/say to pick up new TTS requests.
  • sends converted audio to hermes/audioServer/default/playBytes.
  • closes Snips session via hermes/tts/sayFinished.

The above script also caches already generated WAVs.

One intent overrules all the others

Some of my intents are more complex than others (multiple slots, lots of variations) and seem to override the others.

Ex (not the real one because my language is french and my intents are more complex) :

[onPlay]
play music

[onAlarm]
create ( an alarm | a timer | a reminder | ... ) for ( ...multiple datetime variation... ) with music from ( ...lots of artist... )

When I try to recognize a WAV file with play music I get create ...
If I remove the onAlarm intent I get the correct result.

This is probably due to the language model (N-grams) increasing the likelihood of the create word.

Is there something that can be done to avoid having words that completely override others (a limiting factor maybe? some weighting calculation between intents?)

Support For Alternatives when using Tag Synonyms

First off, cant thank you enough. Been migrating from snips this weekend (sonos thing) and so far Rhasspy is super great.

I may be misunderstanding something but it appears that Alternatives do not work when using Tag Synonyms. I have a room that some people refer to as "den" and some people refer to as "playroom" For instance, both of these Sentences works:

toggle [the] den [light] {light_name:den_overhead}
toggle [the] playroom [light] {light_name:den_overhead}

However this one does not:

toggle [the] (den | playroom) [light] {light_name:den_overhead}

Obviously they both accomplish the same thing but for simplicity sake and since people often have rooms/switches/areas that have multiple names it would be nice to create the one liner Sentences.

More detail:

for
toggle [the] playroom [light] {light_name:den_overhead}
output is:

Raw Intent JSON
"intent":
"entities":
0:
"end": 23
"entity": "light_name"
"raw_end": 20
"raw_start": 11
"raw_value": "den light"
"start": 11
"value": "den_overhead"
"hass_event":
"event_data":
"light_name": "den_overhead"
"event_type": "rhasspy_DoToggleLight"
"intent":
"confidence": 1
"name": "DoToggleLight"
"intents":
"raw_text": "toggle the den light"
"raw_tokens":
0: "toggle"
1: "the"
2: "den"
3: "light"
"slots":
"light_name": "den_overhead"
"speech_confidence": 1
"text": "toggle the den_overhead"
"time_sec": 0.021739721298217773
"tokens":
0: "toggle"
1: "the"
2: "den_overhead"

but for:
toggle [the] (den | playroom) [light] {light_name:den_overhead}
output is:

Raw Intent JSON
"intent":
"entities":
0:
"end": 25
"entity": "light_name"
"raw_end": 20
"raw_start": 11
"raw_value": "den light"
"start": 11
"value": ": den_overhead"
"hass_event":
"event_data":
"light_name": ": den_overhead"
"event_type": "rhasspy_DoToggleLight"
"intent":
"confidence": 1
"name": "DoToggleLight"
"intents":
"raw_text": "toggle the den light"
"raw_tokens":
0: "toggle"
1: "the"
2: "den"
3: "light"
"slots":
"light_name": ": den_overhead"
"speech_confidence": 1
"text": "toggle the : den_overhead"
"time_sec": 0.028543949127197266
"tokens":
0: "toggle"
1: "the"
2: ":"
3: "den_overhead"

Slot value is not extracted if optional

For ASR result:

read me the hound of the baskervilles in the bedroom

With:

[playBook]
read me ($audiobook-book-name){book} ($assistant-zones){zone}

I get both book and zone slot extracted by the NLU.

With

[playBook]
read me ($audiobook-book-name){book} [ ($assistant-zones){zone} ]

I get only book although zone is present.

Hope this helps.

Type error while connecting to mqtt

Hi,

I'm getting a error while Rasspy connects to MQTT, it also generates errors in the MQTT log. It looks like the port value is read as string but compared as int in the connect file.

[DEBUG:109299679] HermesMqtt: Reconnecting in 5 second(s)
[ERROR:109299678] HermesMqtt: connecting
Traceback (most recent call last):
  File "/usr/share/rhasspy/rhasspy/mqtt.py", line 110, in do_connect
    ret = self.client.connect(self.host, self.port)
  File "/usr/local/lib/python3.6/dist-packages/paho/mqtt/client.py", line 838, in connect
    self.connect_async(host, port, keepalive, bind_address)
  File "/usr/local/lib/python3.6/dist-packages/paho/mqtt/client.py", line 894, in connect_async
    if port <= 0:
TypeError: '<=' not supported between instances of 'str' and 'int'

My config:

    "mqtt": {
        "enabled": true,
        "host": "hassio.local",
        "password": "password",
        "username": "rhasspy",
        "port": 1883,
        "reconnect_sec": 5,
        "site_id": "default",
        "publish_intents": true
    }

Problem during download profile

In a docker install, on the download profile page, as soon as I press download now button, it displays a message in red saying
"Compressed file ended before the end-of-stream marker was reached "

Tried on both a desktop and on a raspberry pi, faced the same issue

error when run: python3 -m pip install snowboy-1.3.0.tar.gz

(.venv) root@DiskStation:/rhasspy/.venv# python3 -m pip install snowboy-1.3.0.tar.gz
Processing ./snowboy-1.3.0.tar.gz
Requirement already satisfied: PyAudio in ./lib/python3.7/site-packages (from snowboy==1.2.0b1) (0.2.11)
Building wheels for collected packages: snowboy
Building wheel for snowboy (setup.py) ... error
Complete output from command /rhasspy/.venv/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-req-build-dto_0pe5/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d /tmp/pip-wheel-e94tpjxi --python-tag cp37:
running bdist_wheel
running build
Compiling snowboy...
make: python3-config: Command not found
make: python3-config: Command not found
swig -I../../ -c++ -python -o snowboy-detect-swig.cc snowboy-detect-swig.i
g++ -I../../ -O3 -fPIC -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++0x -c snowboy-detect-swig.cc
snowboy-detect-swig.cc:176:21: fatal error: Python.h: No such file or directory

include <Python.h>

                   ^

compilation terminated.
Makefile:70: recipe for target 'snowboy-detect-swig.o' failed
make: *** [snowboy-detect-swig.o] Error 1
creating build
creating build/lib
creating build/lib/snowboy
error: can't copy 'swig/Python3/_snowboydetect.so': doesn't exist or not a regular file


Failed building wheel for snowboy
Running setup.py clean for snowboy
Failed to build snowboy
Installing collected packages: snowboy
Running setup.py install for snowboy ... error
Complete output from command /rhasspy/.venv/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-req-build-dto_0pe5/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-cbnczbhh/install-record.txt --single-version-externally-managed --compile --install-headers /rhasspy/.venv/include/site/python3.7/snowboy:
running install
running build
Compiling snowboy...
make: python3-config: Command not found
make: python3-config: Command not found
g++ -I../../ -O3 -fPIC -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++0x -c snowboy-detect-swig.cc
snowboy-detect-swig.cc:176:21: fatal error: Python.h: No such file or directory
# include <Python.h>
^
compilation terminated.
Makefile:70: recipe for target 'snowboy-detect-swig.o' failed
make: *** [snowboy-detect-swig.o] Error 1
creating build
creating build/lib
creating build/lib/snowboy
error: can't copy 'swig/Python3/_snowboydetect.so': doesn't exist or not a regular file

----------------------------------------

Command "/rhasspy/.venv/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-req-build-dto_0pe5/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-cbnczbhh/install-record.txt --single-version-externally-managed --compile --install-headers /rhasspy/.venv/include/site/python3.7/snowboy" failed with error code 1 in /tmp/pip-req-build-dto_0pe5/

Mycroft intent handler could not be loaded

There's nothing special about my configuration. I configured mycroft adapt via the web interface.
Do you need some more debug information?

[ERROR:267932] AdaptIntentRecognizer: in_loaded
Traceback (most recent call last):
  File "/usr/share/rhasspy/rhasspy/intent.py", line 688, in in_loaded
    self.load_engine()
  File "/usr/share/rhasspy/rhasspy/intent.py", line 742, in load_engine
    assert self.engine is not None
AssertionError

Installation on virtual environment fails for latest raspbian (buster)

Hi,

Trying to install rhasspy on a clean raspbian buster lite fails with (virtualenv method):

pi@raspberrypi:~/rhasspy $ ./download-dependencies.sh Downloading /home/pi/rhasspy/download/rhasspy-tools_amd64.tar.gz (https://github.com/synesthesiam/rhasspy/releases/download/v2.0/rhasspy-tools_amd64.tar.gz) Downloading /home/pi/rhasspy/download/rhasspy-tools_armhf.tar.gz (https://github.com/synesthesiam/rhasspy/releases/download/v2.0/rhasspy-tools_armhf.tar.gz) Downloading /home/pi/rhasspy/download/rhasspy-tools_aarch64.tar.gz (https://github.com/synesthesiam/rhasspy/releases/download/v2.0/rhasspy-tools_aarch64.tar.gz) curl: (22) The requested URL returned error: 404 Not Found
Any workaround? Thanks,

Feature request: No audio out/in (Docker Swarm)

Hi Michael,

Is it possible to run a container without a audio in/out device? On my docker swarm the container can pop-up on any node ( I should admit that locking the container to a specific node is possible but this is not something I want :) ) and I don't want to pass-trough a audio device in my server to a specific node in the cluster.

I do have to say that I'm a real beginner in the voice assistant world therefore I can't make a really good guess if this is possible/desirable.

Thank you for your time! 👍

Can't change language

I'm running inside docker (amd64). When trying to "Save Settings" in Settings tab (after changing language), it writes me "Wrote 1628 byte(s) to /profiles/en/profile.json", but I changed my language. I build image from your github repo (make docker-amd64).

The same problem with my RPi3 inside docker

 * Serving Flask app "app.py"
 * Environment: production
   WARNING: Do not use the development server in a production environment.
   Use a production WSGI server instead.
 * Debug mode: off
DEBUG:app:Namespace(profile=None, set=[])
DEBUG:RhasspyCore:Loaded profile from /usr/share/rhasspy/profiles/en/profile.json
INFO:root:++++ Actor System gen (3, 9) started, admin @ A@(T|:1900)
DEBUG:root:Thespian source: /usr/local/lib/python3.6/site-packages/thespian/__init__.py
DEBUG:DialogueManager: -> started
DEBUG:DialogueManager:started -> loading_mqtt
DEBUG:DialogueManager:Loading MQTT first
DEBUG:DialogueManager:Loading...will time out after 30 second(s)
DEBUG:HermesMqtt: -> started
DEBUG:DialogueManager:loading_mqtt -> loading
DEBUG:DialogueManager:Loading actors
DEBUG:DialogueManager:Actors created. Waiting for ['recorder', 'player', 'wake', 'command', 'decoder', 'recognizer', 'handler', 'hass_handler', 'sentence_generator', 'speech_trainer', 'intent_trainer', 'word_pronouncer'] to start.
DEBUG:JsgfSentenceGenerator: -> started
DEBUG:APlayAudioPlayer: -> started
DEBUG:HomeAssistantIntentHandler: -> started
DEBUG:PyAudioRecorder: -> started
DEBUG:WebrtcvadCommandListener: -> started
DEBUG:FuzzyWuzzyRecognizer: -> started
DEBUG:DialogueManager:sentence_generator started
DEBUG:HomeAssistantIntentHandler:started -> started
DEBUG:FuzzyWuzzyIntentTrainer: -> started
DEBUG:PocketsphinxSpeechTrainer: -> started
DEBUG:FuzzyWuzzyRecognizer:Loaded examples from /usr/share/rhasspy/profiles/en/intent_examples.json
DEBUG:PhonetisaurusPronounce: -> started
DEBUG:DialogueManager:player started
DEBUG:FuzzyWuzzyRecognizer:started -> loaded
DEBUG:WebrtcvadCommandListener:started -> loaded
DEBUG:DialogueManager:recorder started
DEBUG:DialogueManager:handler started
DEBUG:DialogueManager:intent_trainer started
DEBUG:DialogueManager:command started
DEBUG:DialogueManager:recognizer started
DEBUG:DialogueManager:speech_trainer started
DEBUG:DialogueManager:hass_handler started
DEBUG:DialogueManager:word_pronouncer started
DEBUG:PocketsphinxWakeListener: -> started
DEBUG:PocketsphinxWakeListener:Loading wake decoder with hmm=/usr/share/rhasspy/profiles/en/acoustic_model, dict=/usr/share/rhasspy/profiles/en/dictionary.txt
DEBUG:PocketsphinxWakeListener:started -> loaded
DEBUG:DialogueManager:wake started
DEBUG:PocketsphinxDecoder: -> started
INFO:PocketsphinxDecoder:Loading decoder with hmm=/usr/share/rhasspy/profiles/en/acoustic_model, dict=/usr/share/rhasspy/profiles/en/dictionary.txt, lm=/usr/share/rhasspy/profiles/en/language_model.txt
DEBUG:PocketsphinxDecoder:started -> loaded
DEBUG:DialogueManager:decoder started
DEBUG:PocketsphinxWakeListener:loaded -> listening
DEBUG:PyAudioRecorder:started -> recording
INFO:DialogueManager:Actors loaded
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM sysdefault
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM sysdefault
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM dmix
DEBUG:DialogueManager:loading -> ready
INFO:DialogueManager:Automatically listening for wake word
DEBUG:DialogueManager:ready -> asleep
ERROR:PyAudioRecorder:receiveMessage
Traceback (most recent call last):

  File "/usr/share/rhasspy/rhasspy/actor.py", line 50, in receiveMessage
    self._state_method(message, sender)

  File "/usr/share/rhasspy/rhasspy/audio_recorder.py", line 104, in in_started
    self.transition('recording')

  File "/usr/share/rhasspy/rhasspy/actor.py", line 76, in transition
    getattr(self, transition_method)(from_state)

  File "/usr/share/rhasspy/rhasspy/audio_recorder.py", line 129, in to_recording
    frames_per_buffer=self.frames_per_buffer)

  File "/usr/local/lib/python3.6/site-packages/pyaudio.py", line 750, in open
    stream = Stream(self, *args, **kwargs)

  File "/usr/local/lib/python3.6/site-packages/pyaudio.py", line 441, in __init__
    self._stream = pa.open(**arguments)

OSError: [Errno -9996] Invalid input device (no default output device)

INFO:werkzeug: * Running on http://0.0.0.0:12101/ (Press CTRL+C to quit)
DEBUG:app:Loading phoneme examples from /usr/share/rhasspy/profiles/en/phoneme_examples.txt
INFO:werkzeug:95.84.157.26 - - [02/Mar/2019 17:23:04] "GET /api/phonemes HTTP/1.1" 200 -
INFO:werkzeug:95.84.157.26 - - [02/Mar/2019 17:23:04] "GET /api/profile?layers=defaults HTTP/1.1" 200 -
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM sysdefault
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM sysdefault
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM dmix
ERROR:DialogueManager:receiveMessage
Traceback (most recent call last):

  File "/usr/share/rhasspy/rhasspy/actor.py", line 50, in receiveMessage
    self._state_method(message, sender)

  File "/usr/share/rhasspy/rhasspy/dialogue.py", line 174, in in_asleep
    self.handle_any(message, sender)

  File "/usr/share/rhasspy/rhasspy/dialogue.py", line 408, in handle_any
    self.handle_forward(message, sender)

  File "/usr/share/rhasspy/rhasspy/dialogue.py", line 423, in handle_forward
    mics = recorder_class.get_microphones()

  File "/usr/share/rhasspy/rhasspy/audio_recorder.py", line 197, in get_microphones
    default_name = audio.get_default_input_device_info().get('name')

  File "/usr/local/lib/python3.6/site-packages/pyaudio.py", line 949, in get_default_input_device_info
    device_index = pa.get_default_input_device()

OSError: No Default Input Device Available

INFO:werkzeug:95.84.157.26 - - [02/Mar/2019 17:23:04] "GET /api/profile?layers=defaults HTTP/1.1" 200 -
INFO:werkzeug:95.84.157.26 - - [02/Mar/2019 17:23:04] "GET /api/profiles HTTP/1.1" 200 -
INFO:werkzeug:95.84.157.26 - - [02/Mar/2019 17:23:04] "GET /api/unknown_words?profile=en HTTP/1.1" 200 -
DEBUG:app:Wrote 5381 byte(s) to /profiles/defaults.json
INFO:werkzeug:95.84.157.26 - - [02/Mar/2019 17:23:22] "POST /api/profile?layers=defaults HTTP/1.1" 200 -
DEBUG:app:Wrote 1628 byte(s) to /profiles/en/profile.json
INFO:werkzeug:95.84.157.26 - - [02/Mar/2019 17:23:22] "POST /api/profile HTTP/1.1" 200 -
INFO:werkzeug:95.84.157.26 - - [02/Mar/2019 17:23:23] "GET / HTTP/1.1" 200 -
DEBUG:app:Loading phoneme examples from /usr/share/rhasspy/profiles/en/phoneme_examples.txt
INFO:werkzeug:95.84.157.26 - - [02/Mar/2019 17:23:23] "GET /api/phonemes HTTP/1.1" 200 -
INFO:werkzeug:95.84.157.26 - - [02/Mar/2019 17:23:23] "GET /api/profile?layers=defaults HTTP/1.1" 200 -
ERROR:DialogueManager:receiveMessage
Traceback (most recent call last):

  File "/usr/share/rhasspy/rhasspy/actor.py", line 50, in receiveMessage
    self._state_method(message, sender)

  File "/usr/share/rhasspy/rhasspy/dialogue.py", line 174, in in_asleep
    self.handle_any(message, sender)

  File "/usr/share/rhasspy/rhasspy/dialogue.py", line 408, in handle_any
    self.handle_forward(message, sender)

  File "/usr/share/rhasspy/rhasspy/dialogue.py", line 423, in handle_forward
    mics = recorder_class.get_microphones()

  File "/usr/share/rhasspy/rhasspy/audio_recorder.py", line 197, in get_microphones
    default_name = audio.get_default_input_device_info().get('name')

  File "/usr/local/lib/python3.6/site-packages/pyaudio.py", line 949, in get_default_input_device_info
    device_index = pa.get_default_input_device()

OSError: No Default Input Device Available

INFO:werkzeug:95.84.157.26 - - [02/Mar/2019 17:23:23] "GET /api/profile?layers=defaults HTTP/1.1" 200 -
INFO:werkzeug:95.84.157.26 - - [02/Mar/2019 17:23:23] "GET /api/profiles HTTP/1.1" 200 -
INFO:werkzeug:95.84.157.26 - - [02/Mar/2019 17:23:23] "GET /api/unknown_words?profile=en HTTP/1.1" 200 -
INFO:werkzeug:95.84.157.26 - - [02/Mar/2019 17:23:24] "GET /img/favicon.png HTTP/1.1" 200 -
DEBUG:app:Wrote 5381 byte(s) to /profiles/defaults.json
INFO:werkzeug:95.84.157.26 - - [02/Mar/2019 17:23:39] "POST /api/profile?layers=defaults HTTP/1.1" 200 -
DEBUG:app:Wrote 1681 byte(s) to /profiles/en/profile.json
INFO:werkzeug:95.84.157.26 - - [02/Mar/2019 17:23:40] "POST /api/profile HTTP/1.1" 200 -
DEBUG:app:Wrote 5381 byte(s) to /profiles/defaults.json
INFO:werkzeug:95.84.157.26 - - [02/Mar/2019 17:23:45] "POST /api/profile?layers=defaults HTTP/1.1" 200 -
DEBUG:app:Wrote 1681 byte(s) to /profiles/en/profile.json
INFO:werkzeug:95.84.157.26 - - [02/Mar/2019 17:23:45] "POST /api/profile HTTP/1.1" 200 -
DEBUG:app:Wrote 5381 byte(s) to /profiles/defaults.json
INFO:werkzeug:95.84.157.26 - - [02/Mar/2019 17:23:53] "POST /api/profile?layers=defaults HTTP/1.1" 200 -
DEBUG:app:Wrote 1681 byte(s) to /profiles/en/profile.json
INFO:werkzeug:95.84.157.26 - - [02/Mar/2019 17:23:53] "POST /api/profile HTTP/1.1" 200 -
INFO:werkzeug:95.84.157.26 - - [02/Mar/2019 17:23:56] "GET / HTTP/1.1" 200 -
DEBUG:app:Loading phoneme examples from /usr/share/rhasspy/profiles/en/phoneme_examples.txt
INFO:werkzeug:95.84.157.26 - - [02/Mar/2019 17:23:57] "GET /api/phonemes HTTP/1.1" 200 -
INFO:werkzeug:95.84.157.26 - - [02/Mar/2019 17:23:57] "GET /api/profile?layers=defaults HTTP/1.1" 200 -
ERROR:DialogueManager:receiveMessage
Traceback (most recent call last):

  File "/usr/share/rhasspy/rhasspy/actor.py", line 50, in receiveMessage
    self._state_method(message, sender)

  File "/usr/share/rhasspy/rhasspy/dialogue.py", line 174, in in_asleep
    self.handle_any(message, sender)

  File "/usr/share/rhasspy/rhasspy/dialogue.py", line 408, in handle_any
    self.handle_forward(message, sender)

  File "/usr/share/rhasspy/rhasspy/dialogue.py", line 423, in handle_forward
    mics = recorder_class.get_microphones()

  File "/usr/share/rhasspy/rhasspy/audio_recorder.py", line 197, in get_microphones
    default_name = audio.get_default_input_device_info().get('name')

  File "/usr/local/lib/python3.6/site-packages/pyaudio.py", line 949, in get_default_input_device_info
    device_index = pa.get_default_input_device()

OSError: No Default Input Device Available

INFO:werkzeug:95.84.157.26 - - [02/Mar/2019 17:23:57] "GET /api/profile?layers=defaults HTTP/1.1" 200 -
INFO:werkzeug:95.84.157.26 - - [02/Mar/2019 17:23:57] "GET /api/profiles HTTP/1.1" 200 -
INFO:werkzeug:95.84.157.26 - - [02/Mar/2019 17:23:57] "GET /api/unknown_words?profile=en HTTP/1.1" 200 -
INFO:werkzeug:95.84.157.26 - - [02/Mar/2019 17:23:57] "GET /img/favicon.png HTTP/1.1" 200 -

Display the full version in the web UI

At the moment, only the major and minor versions (x.x) are displayed next to the logo in the web UI.

It would be usefull to have the full version (x.x.x) and help avoid version/upgrade mistakes.

WebSocket errors

I don't use WebSockets, but I see a lot of these error messages in my logs after various events:

[ERROR:3744062] __main__: api_events_log
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/geventwebsocket/websocket.py", line 328, in send_frame
    self.raw_write(header + message)
  File "/usr/local/lib/python3.6/dist-packages/gevent/_socket3.py", line 458, in sendall
    return _socketcommon._sendall(self, data_memory, flags)
  File "/usr/local/lib/python3.6/dist-packages/gevent/_socketcommon.py", line 374, in _sendall
    timeleft = __send_chunk(socket, chunk, flags, timeleft, end)
  File "/usr/local/lib/python3.6/dist-packages/gevent/_socketcommon.py", line 303, in __send_chunk
    data_sent += socket.send(chunk, flags)
  File "/usr/local/lib/python3.6/dist-packages/gevent/_socket3.py", line 439, in send
    return _socket.socket.send(self._sock, data, flags)
BrokenPipeError: [Errno 32] Broken pipe

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/geventwebsocket/websocket.py", line 344, in send
    self.send_frame(message, opcode)
  File "/usr/local/lib/python3.6/dist-packages/geventwebsocket/websocket.py", line 330, in send_frame
    raise WebSocketError(MSG_SOCKET_DEAD)
geventwebsocket.exceptions.WebSocketError: Socket is dead

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "app.py", line 881, in api_events_log
    ws.send(text)
  File "/usr/local/lib/python3.6/dist-packages/geventwebsocket/websocket.py", line 347, in send
    raise WebSocketError(MSG_SOCKET_DEAD)
geventwebsocket.exceptions.WebSocketError: Socket is dead

Support for receiving from / sending to multiple site ids

Is it possible to have Rhasspy listen for Hermes data from multiple different site ids and pass the received site id through to the intent object so it could then be used in a direct (Hermes TTS) response back to that site?

This would enable using multiple individually-addressable "satellites" and not have response audio go back to all sites, just the one that is being actively used.

Some profiles missing in docker latest image

Attempting to run docker image with catalan profile:

$ docker run -d -p 12101:12101 --restart unless-stopped -v "$HOME/.config/rhasspy/profiles:/profiles" synesthesiam/rhasspy-server:latest --user-profiles /profiles --profile ca

Gives the following error:

Traceback (most recent call last):
File "app.py", line 910, in
start_rhasspy()
File "app.py", line 135, in start_rhasspy
args.profile, system_profiles_dir, user_profiles_dir, actor_system=system
File "/usr/share/rhasspy/rhasspy/core.py", line 75, in init
self.profile_name, system_profiles_dir, user_profiles_dir
File "/usr/share/rhasspy/rhasspy/profiles.py", line 30, in init
self.load_profile()
File "/usr/share/rhasspy/rhasspy/profiles.py", line 68, in load_profile
with open(system_profile_path, "r") as system_profile_file:
FileNotFoundError: [Errno 2] No such file or directory: '/usr/share/rhasspy/profiles/ca/profile.json'

Doing:

docker container exec e0d5ce05f34d ls /usr/share/rhasspy/profiles/

When the container is running with the 'en' profile, lists the following:

de
defaults.json
el
en
es
fr
hi
it
nl
pt
ru
sv
vi
zh

But I see the 'ca' profile in github, so I guess it is missing in the docker image.

Flask Import issue - Import troubleshooting for raspbian

keep getting following error after executing ./run-venv.sh --profile en

Traceback (most recent call last):
  File "app.py", line 23, in <module>
    from flask import (
ImportError: cannot import name 'Flask'

installation for Virtual Environment.

Installed package versions:

  • Python 3.6.3
  • Flask 1.0.3

Any solution?

Incorrect slot value using new substitution feature

The new slot value substitution feature (2.4.12) is awesome and greatly improve the readability of the slot files.

When parsing the ASR result, the extracted slot value contains both the spoken words and the substitution value.

For instance:
Slot: ( in the bathroom | ... ):bathroom
ASR: turn on the light in the batchroom
NLU extracted slot value: in the bathroom bathroom

Support for ARMv6

Rhasspy doesn't support ARMv6 which prevents its use on the Pi Zero and Pi Zero W.
Either need new precompiled binaries for the v6 arch or a build from src option.

Illegal instruction

Trying to get this running on a pi.

running ./run-venv.sh throws an error:
./run-venv.sh: line 28: 916 Illegal instruction python3 app.py

doing python3 app.py manually gives:

  File "app.py", line 838
    ws_queues:List[Dict[Any, GQueue]] = [{}, {}]
             ^
SyntaxError: invalid syntax

Any idea how to solve this? As I cannot find this issue reported anywhere it looks like a system related issue?

Kaldi installation (profile de) does not install required files

Hi!

I just did a clean install of rhasspy docker image and selected profile "de" during installation.
It seems that the later Kaldi installation has issues.

I had to basically copy the contents of https://github.com/synesthesiam/rhasspy/tree/master/profiles/de/kaldi manually into ~/.config/rhasspy/profiles/de/kaldi.

Without this, training did not succeed and complained about missing "HCLG.fst".
So I stumbled accross the same issue as someone else described here: https://community.home-assistant.io/t/rhasspy-offline-voice-assistant-toolkit/60862/901

Google AIY Voice Hat for microphone?

Have you played with or know the success of using Google AIY Voice Kits with Rhasspy? You get all the parts sans the Pi for a little voice assistant doodad, including a two-mic array.

Micro Center has been clearing out a massive number of the original AIY Voice Kit for $2.99 for a while, and I bought like... five or six, I think: https://www.microcenter.com/product/483414/google-aiy-voice-kit

I know Snips.ai worked with the Voice Kit hardware: https://medium.com/snips-ai/is-it-google-aiy-nah-its-snips-f67c9dc2139a

HTTP API UI not available in web browser

According to the documentation, I can "visit /api on your Rhasspy web server (e.g., http://localhost:12101/api)." I also remember I was able to do this in the past and I saw a nice UI in my web browser. However, when I'm doing it now (Rhasspy 2.4 on Ubuntu 19.10 amd64, installed in a Python virtual environment), I get a 404 error:

INFO:quart.serving:127.0.0.1:36168 GET /api 1.1 500 13 2788
[2019-12-12 09:00:14,759] 127.0.0.1:36168 GET /api 1.1 500 13 2788
ERROR:__main__:NotFound(404)
Traceback (most recent call last):
  File "/home/koan/rhasspy/.venv/lib/python3.7/site-packages/quart/app.py", line 1544, in full_dispatch_request
    result = await self.dispatch_request(request_context)
  File "/home/koan/rhasspy/.venv/lib/python3.7/site-packages/quart/app.py", line 1586, in dispatch_request
    raise request_.routing_exception
  File "/home/koan/rhasspy/.venv/lib/python3.7/site-packages/quart/ctx.py", line 45, in match_request
    self.request_websocket.url_rule, self.request_websocket.view_args = self.url_adapter.match()  # noqa
  File "/home/koan/rhasspy/.venv/lib/python3.7/site-packages/quart/routing.py", line 288, in match
    raise NotFound()
quart.exceptions.NotFound: NotFound(404)

Meanwhile, with rhasspy-client I can perfectly access the API endpoints.

Multiple keywords in Snowboy universal wake word model causes error/core dump

Some universal Snowboy models have multiple hotwords and will cause the following error (or at least one does. Jarvis was encoded with both "jarvis" and "Jarvis." Kitt-AI/snowboy#447 talks about this. )

DEBUG:SnowboyWakeListener:Loading snowboy model from /profiles/en/snowboy/jarvis.umdl 
ERROR (ClassifySensitivities():pipeline-detect.cc:744) PipelineDetect: number of hotwords and number of sensitivities mismatch, expecting sensitivities for 0 personal hotwords, and 2 universal hotwords, got 1 sensitivities instead.
terminate called after throwing an instance of 'std::runtime_error'
  what():  ERROR (ClassifySensitivities():pipeline-detect.cc:744) PipelineDetect: number of hotwords and number of sensitivities mismatch, expecting sensitivities for 0 personal hotwords, and 2 universal hotwords, got 1 sensitivities instead.

[stack trace: ]
Backtrace has not been implemented yet.

/run.sh: line 28:    10 Aborted                 (core dumped) python3 app.py "$@"

The following profile will trigger this error:

{
    "wake": {
        "snowboy": {
            "model": "snowboy/jarvis.umdl",
            "sensitivity": "0.8",
        },
        "system": "snowboy"
    }
}

After quite a bit of digging and searching, I found that in wake.py, you have the following code:

            sensitivity = float(self.profile.get("wake.snowboy.sensitivity", 0.5))
            audio_gain = float(self.profile.get("wake.snowboy.audio_gain", 1.0))

            self._logger.debug("Loading snowboy model from %s", model_path)

            self.detector = snowboydetect.SnowboyDetect(
                snowboydecoder.RESOURCE_FILE.encode(), model_path.encode()
            )

            assert self.detector is not None

            sensitivity_str = str(sensitivity).encode()
            self.detector.SetSensitivity(sensitivity_str)

Now I am by NO means proficient in python and, in fact, have avoided even TRYING to learn it till recently (and I've been messing with computers off and on probably for longer than you have been alive. Some of my first coding was in college on a time-shared IBM-360 writing in COBOL, Fortran, PL/1 and RPG in 1979 and later when I wrote a word-processing program in BASIC on a Tandy CoCo computer back in 1981 or so. But python, and PHP, drive me nuts with the un-typed variables and why does JSON need a , at the end of a list such as the one at the end of the "sensitivity" section above? Took me a while to figure out why the syntax highlighting was indicating an error in Joe. But I digress....)

Anyways, I figured out that if I changed profile.json to read ..."sensitivity": "0.8,0.80"... maybe it would work. But nope, it then gave me errors in the float() statement. Changing the code to the following seems to be working OK and allows the multiple hotwords/sensitivity without any errors either from the python or from the Snowboy library.

#            sensitivity = float(self.profile.get("wake.snowboy.sensitivity", 0.5))
            sensitivity = self.profile.get("wake.snowboy.sensitivity", 0.5)
            audio_gain = float(self.profile.get("wake.snowboy.audio_gain", 1.0))

            self._logger.debug("Loading snowboy model from %s", model_path)
                model_path,
                sensitivity,
                audio_gain,
            )
            self.detector = snowboydetect.SnowboyDetect(
                snowboydecoder.RESOURCE_FILE.encode(), model_path.encode()
            )

            assert self.detector is not None
            self._logger.debug("Asserted")

#            sensitivity_str = str(sensitivity).encode()
            sensitivity_str = sensitivity.encode()

So my burning question is: Is there a reason why you were taking the string returned from self.profile.get("wake.snowboy.sensitivity", 0.5) and turning it into a number and then turning it right back into a string again a few lines further down, other than maybe to generate an error if someone did put in a value that was not a number? Of course this way the user would be responsible for making sure the sensitivity string matched the number of hotwords but it does make it more flexible.

Also, I haven't changed/tested it yet but possibly allowing the model to be a list as well may allow for multiple personal hotwords trained for several different people:

"model":"snowboy/jarvis.umdl,snowboy/snowboy.umdl,snowboy/person1.pmld,snowboy/person2.pmld,snowboy/person3.pmld"

The user would just need to make sure there's enough sensitivity settings to match.

[Feature] Allow splitting sentenses.ini file

With lots of intents, the sentenses.ini file can get huge and unreadable.

It would be awesome to be able to split it in multiple files.

Why not move the sentenses.ini file in a intents/ folder in the profile and merge all .ini files in that folder at training time (like what is done for the slots).

That way we can have one file per intent or per domain if needed.

Note: This will break the web UI "Sentences" tab. Maybe adding a SELECT to edit each file separately can be a good mitigation.

Issues getting started

Hi - I installed a fresh copy of hass.io on a Pi3 with a ps3 USB camera plus audio USB device plugged in and managed to get to the web interface just fine. As a test, I selected that (2: USB Camera-B4.09.24.1: Audio (hw:1,0). and press Hold to Record and held the mouse down, but when I let go, the Release to stop remained red. I left it for a while but nothing came back. In the add on log I get the following. Any thoughts appreciated and I'm happy to run any other initial tests recommended. The main hassio system log showed nothing unusual that I could see, just saying the add was started. version 1.13

Log ALSA lib conf.c:5034:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM surround41 ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround51.0:CARD=0' ALSA lib conf.c:4555:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5034:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM surround50 INFO:werkzeug:10.13.84.113 - - [31/Dec/2018 05:54:11] "GET /api/phonemes?profile=en HTTP/1.1" 200 - ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround51.0:CARD=0' ALSA lib conf.c:4555:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5034:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM surround51 ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround71.0:CARD=0' ALSA lib conf.c:4555:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5034:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM surround71 ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2' ALSA lib conf.c:4555:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5034:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM iec958 ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2' ALSA lib conf.c:4555:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5034:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM spdif ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2' ALSA lib conf.c:4555:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5034:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM spdif ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline Cannot connect to server socket err = No such file or directory Cannot connect to server request channel jack server is not running or cannot be started INFO:werkzeug:10.13.84.113 - - [31/Dec/2018 05:54:12] "GET /api/microphones?profile=en HTTP/1.1" 200 - INFO:werkzeug:10.13.84.113 - - [31/Dec/2018 05:54:12] "GET /api/custom-words?profile=en HTTP/1.1" 200 - INFO:werkzeug:10.13.84.113 - - [31/Dec/2018 05:54:12] "GET /api/profile?profile=en&layers=defaults HTTP/1.1" 200 - INFO:werkzeug:10.13.84.113 - - [31/Dec/2018 05:54:12] "GET /api/profile?profile=en&layers=profile HTTP/1.1" 200 - INFO:werkzeug:10.13.84.113 - - [31/Dec/2018 05:54:12] "GET /api/profiles HTTP/1.1" 200 - INFO:werkzeug:10.13.84.113 - - [31/Dec/2018 05:54:12] "GET /api/unknown_words?profile=en HTTP/1.1" 200 - INFO:werkzeug:10.13.84.113 - - [31/Dec/2018 05:54:13] "GET /img/favicon.png HTTP/1.1" 200 - ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.front.0:CARD=0' ALSA lib conf.c:4555:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5034:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM front ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround51.0:CARD=0' ALSA lib conf.c:4555:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5034:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM surround21 ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround51.0:CARD=0' ALSA lib conf.c:4555:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5034:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM surround21 ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround40.0:CARD=0' ALSA lib conf.c:4555:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5034:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM surround40 ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround51.0:CARD=0' ALSA lib conf.c:4555:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5034:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM surround41 ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround51.0:CARD=0' ALSA lib conf.c:4555:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5034:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM surround50 ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround51.0:CARD=0' ALSA lib conf.c:4555:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5034:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM surround51 ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround71.0:CARD=0' ALSA lib conf.c:4555:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5034:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM surround71 ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2' ALSA lib conf.c:4555:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5034:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM iec958 ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2' ALSA lib conf.c:4555:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5034:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM spdif ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2' ALSA lib conf.c:4555:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5034:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM spdif ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline Cannot connect to server socket err = No such file or directory Cannot connect to server request channel jack server is not running or cannot be started INFO:werkzeug:10.13.84.113 - - [31/Dec/2018 05:54:20] "POST /api/start-recording?profile=en&device=2 HTTP/1.1" 200 -

Adding a websocket event for wake word

Hey! Would you consider adding a new WebSocket event called /api/events/wakeword. This would allow users to trigger LEDs for visual confirmation that Rhasspy is listening. It seems that the only way to react to a wake word event is by parsing the logs in /api/events/log which isn't an ideal solution.

Virtual environment installation fails

The script download-dependencies.sh fails with the following error:

download-dependencies.sh: Zeile 73: CPU_TO_FRIENDLY: Falscher Feldbezeichner.

It's german, sorry. The error occurs in line 73. CPU_TO_FRIENDLY seems wrong here.

Additional:
Arch Linux with Kernel 5.3.12-arch1-1
Bash: GNU bash, Version 5.0.11(1)-release (x86_64-pc-linux-gnu)

Is Arch Linux supported? If not, is there a manual for generic Linux for installing rhasspy?

Node-Red send text to Rhasspy to play (feature request)

I'm not sure if this already exists and I'm just not seeing it or exactly what the case is but........

Is there a way that you can "push" text to Rhasspy to have it speak it? I.e. I know you can do the following:

  1. Say something to Rhasspy.
  2. send an intent back to HomeAssistant or Node-Red.
  3. Say something back to the user like "OK" or "It's not responding", etc.

But what about Node-Red seeing there's a timer that's up and it needs to send out "You have a doctor's appt in 1 hour" to all Rhasspy devices. Can Node-Red send some sort of a MQTT or an API call that one (or all) devices will get that will make them say something out of the blue?

Default sentences.ini - training error

Hello! I've just started to set up Rhasspy and it fails when I try to train it with default profiles/en/sentences.ini

Training failed: <Task: ini_graph>: TaskError PythonAction Error Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/doit/action.py", line 437, in execute returned_value = self.py_callable(*self.args, **kwargs) File "/usr/share/rhasspy/rhasspy/train/__init__.py", line 181, in do_intents_to_graph graph = intents_to_graph(intents, replacements) File "/usr/local/lib/python3.6/dist-packages/rhasspynlu/jsgf_graph.py", line 256, in intents_to_graph grammar_name=intent_name, File "/usr/local/lib/python3.6/dist-packages/rhasspynlu/jsgf_graph.py", line 93, in expression_to_graph grammar_name=grammar_name, File "/usr/local/lib/python3.6/dist-packages/rhasspynlu/jsgf_graph.py", line 139, in expression_to_graph grammar_name=grammar_name, File "/usr/local/lib/python3.6/dist-packages/rhasspynlu/jsgf_graph.py", line 72, in expression_to_graph grammar_name=grammar_name, File "/usr/local/lib/python3.6/dist-packages/rhasspynlu/jsgf_graph.py", line 129, in expression_to_graph assert rule_replacements, f"Missing rule {rule_name}" AssertionError: Missing rule <changelightcolor.light_name>

As I see the issue is in <ChangeLightColor.light_name> under [ChangeLightState]

[ChangeLightState]
light_name = ((living room lamp | garage light) {name}) | <ChangeLightColor.light_name>
light_state = (on | off) {state}

When I remove it I see no errors

It's not a critical bug, but it confuses newcomers like me =)

Support for slots aliases

Maybe this is a stretch but it would be helpful to have support for a slots aliases file. Given this slots file:

{"light": ["familyroom_overhead","den_overhead"]}

if there was a slots aliases file of:

{"familyroom_overhead": ["family room overhead", "family room", "living room overhead", "living room"],"den_overhead": ["den overhead","den","playroom overhead","playroom"]}

then I could reduce this:

[DoToggleLight]
toggle [the] (kitchen) [light] {light_name:kitchen_overhead}
toggle [the] den [light] {light_name:den_overhead}
toggle [the] playroom [light] {light_name:den_overhead}
toggle [the] play room [light] {light_name:den_overhead}
toggle [the] (entry way) [light] {light_name:entry_way}
toggle [the] (family room) [light] {light_name:familyroom_overhead}
etc...

to this:

[DoToggleLight]
light_name = $light {light_name}
toggle [the] <light_name>

The above is just a lights example but it seems also useful for running scripts using multiple names. For example ["everyone is leaving","were leaving now", "see ya later rhasspy", "I'm off now", etc] can be aliases for the everyone_is_leaving script in Home Assistant

Maybe there is already a way to do this that I am missing, but if not, I request support for the above if possible.

Latest docker image does not start

Here is the docker run output:

Traceback (most recent call last):
  File "app.py", line 14, in <module>
    from quart import (
  File "/usr/local/lib/python3.6/dist-packages/quart/__init__.py", line 4, in <module>
    from .app import Quart
  File "/usr/local/lib/python3.6/dist-packages/quart/app.py", line 16, in <module>
    from .asgi import ASGIHTTPConnection, ASGIWebsocketConnection
  File "/usr/local/lib/python3.6/dist-packages/quart/asgi.py", line 5, in <module>
    from .datastructures import CIMultiDict
  File "/usr/local/lib/python3.6/dist-packages/quart/datastructures.py", line 47, in <module>
    class CIMultiDict(_WerkzeugMultidictMixin, AIOCIMultiDict):  # type: ignore
TypeError: type 'multidict._multidict.CIMultiDict' is not an acceptable base type

create-venv.sh on Raspbian Jessie Python problem

I have a trouble to setup project using create-venv.sh on Rasbian Jessie:

apt-get install python3

installs Python 3.4 but your code relies on Python 3.6

I can't upgrade Rasbian Jessie since it is only one build that works without issues on my board (BPI-M2 Zero).
Could you help with this issue?

Error when training with language model mixing in french

I'm unable to use language model mixing in French.

Here is the error I get in the logs:

INFO:__main__:Starting training
DEBUG:DialogueManager:asleep -> training_sentences
[2019-12-04 17:39:52,557] 172.17.0.1:38098 GET /api/unknown-words 1.1 200 2 2914
INFO:quart.serving:172.17.0.1:38098 GET /api/unknown-words 1.1 200 2 2914
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/doit/doit_cmd.py", line 177, in run
    return command.parse_execute(args)
  File "/usr/local/lib/python3.6/dist-packages/doit/cmd_base.py", line 127, in parse_execute
    return self.execute(params, args)
  File "/usr/local/lib/python3.6/dist-packages/doit/cmd_base.py", line 420, in execute
    return self._execute(**exec_params)
  File "/usr/local/lib/python3.6/dist-packages/doit/cmd_run.py", line 260, in _execute
    return runner.run_all(self.control.task_dispatcher())
  File "/usr/local/lib/python3.6/dist-packages/doit/runner.py", line 256, in run_all
    self.run_tasks(task_dispatcher)
  File "/usr/local/lib/python3.6/dist-packages/doit/runner.py", line 219, in run_tasks
    if not self.select_task(node, task_dispatcher.tasks):
  File "/usr/local/lib/python3.6/dist-packages/doit/runner.py", line 107, in select_task
    task = node.task
AttributeError: 'str' object has no attribute 'task'
DEBUG:DialogueManager:training_sentences -> ready
INFO:DialogueManager:Automatically listening for wake word
DEBUG:DialogueManager:ready -> asleep
ERROR:__main__:Training failed:
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/quart/app.py", line 1471, in full_dispatch_request
    result = await self.dispatch_request(request_context)
  File "/usr/local/lib/python3.6/dist-packages/quart/app.py", line 1519, in dispatch_request
    return await handler(**request_.view_args)
  File "app.py", line 494, in api_train
    raise Exception(f"Training failed: {result.reason}")
Exception: Training failed:
-- grammars
...
-- intent_fst
-- language_model:intent_counts
-- language_model:intent_model
[2019-12-04 17:39:52,857] 172.17.0.1:38096 POST /api/train 1.1 500 17 304534
INFO:quart.serving:172.17.0.1:38096 POST /api/train 1.1 500 17 304534

Newest Docker image doesn't start

I have been running your Docker image of Rhasspy without any problems, but the latest updated I pulled fails to start with the following error:

usage: Rhasspy [-h] --profile PROFILE [--host HOST] [--port PORT]
               [--system-profiles SYSTEM_PROFILES]
               [--user-profiles USER_PROFILES] [--set SET SET]
Rhasspy: error: the following arguments are required: --profile/-p

The image is synesthesiam/rhasspy-server:latest@sha256:705299059fb163d2eaaa3c8fcba99d5ab6e14cd2186d4b9bec3218100bed810a.

Environment variables:

  • RHASSPY_PROFILES | /profiles
  • PATH | /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
  • LANG | C.UTF-8
  • RHASSPY_APP | /usr/share/rhasspy
  • CONFIG_PATH | /data/options.json

The RHASSPY_PROFILES path exists and has the same contents as before.

Add continuous integration to the repository

It would be nice to have some kind of continuous integration for this repository (and related Rhasspy repositories), so for each commit tests could be run, some basic linting checks could happen, and so on. This would improve code quality and reliability by catching issues as soon as possible.

I'm using Travis CI for my projects, for instance see https://github.com/koenvervloesem/snipskit/blob/master/.travis.yml

You can start with a basic .travis.yml, for example like https://github.com/koenvervloesem/snips-app-say-it-again/blob/master/.travis.yml

[Feature] Support for slot value synonyms

Hi!
Congrats for this awesome piece of software.
Great work!

I've been searching for more open source alternatives to Snips since the Sonos acquisition as the future of the Snips platform for makers is looking quite grim... Rhasspy looks pretty good :)

One thing that is really missing is the ability to use synonyms for slot values.

Is it possible or do I have to use multiple slot lists (one for each value with synonyms)?

Cheers.

NameError: name 'headers' is not defined

I get this error message in the logs when the HomeAssistantIntentHandler handles an intent:

ERROR:HomeAssistantIntentHandler:handle_intent
Traceback (most recent call last):
  File "/usr/share/rhasspy/rhasspy/intent_handler.py", line 104, in in_started
    intent = self.handle_intent(intent)
  File "/usr/share/rhasspy/rhasspy/intent_handler.py", line 145, in handle_intent
    self.forward_intent(event_type, slots)
  File "/usr/share/rhasspy/rhasspy/intent_handler.py", line 160, in forward_intent
    self._logger.debug("POSTed intent to %s with headers=%s" % (post_url, headers))
NameError: name 'headers' is not defined

[Feature] Support for dynamic vocabulary using entities injection

https://docs.snips.ai/articles/platform/nlu/dynamic-vocabulary

The vocabulary supported by the ASR and the NLU is limited to the words it has seen at training time (i.e. words that were present in your assistant when it was downloaded). For various reasons, you may want to inject new values to your assistant without having to go through the console. Sensitive information, such as contact names, or other personal details that you want your assistant to understand, are better kept private. It can also be tedious to download again an assistant each time you want to update its vocabulary.
For these reasons, we are introducing a new feature, Entities Injection, which allows you to update both the ASR and the NLU models directly on the device.
Each intent within an assistant may contain some slots, and each slot has a specific type that we call an entity. If you have a contact_name entity that contains a list of contacts in an address book, Entities Injection lets you add new contact names to this list.

Required by this Snips skill: https://github.com/Alpha200/snips-openhab
https://snips-openhab.readthedocs.io/de/latest/basics/introduction.html

This skill uses the sementic tagging of OpenHAB and automatically adds vocabulary to Snips for ASR and NLU:
https://community.openhab.org/t/habot-walkthrough-2-n-semantic-tagging-item-resolving/55651

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.