Rhasspy offline voice assistant toolkit

Can you paste your settings? (image is ok)

Here is my profile:

{
    "microphone": {
        "arecord": {
            "device": "hw:CARD=MATRIXIOSOUND,DEV=0"
        },
        "system": "arecord"
    },
    "mqtt": {
        "enabled": true,
        "host": "192.168.86.28"
    },
    "text_to_speech": {
        "system": "wavenet",
        "wavenet": {
            "gender": "MALE"
        }
    },
    "wake": {
        "porcupine": {
            "model": "porcupine/porcupine.ppn"
        },
        "system": "snowboy"
    }
}

Let me know if you would prefer the settings page.

Also, all of a sudden, I am getting failures when I try and add a sentence. It says fail to train:

[INFO:75122] quart.serving: 192.168.86.32:59181 GET /api/problems 1.1 200 315 15995
[DEBUG:75111] InboxActor:  -> stopped
[INFO:74528] quart.serving: 192.168.86.32:59181 POST /api/train 1.1 500 17 332894
[ERROR:74512] __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 622, in api_train
    raise Exception(f"Training failed: {result.reason}")
Exception: Training failed: 
[DEBUG:74510] InboxActor:  -> stopped
[DEBUG:74499] SnowboyWakeListener: loaded -> listening
[DEBUG:74498] DialogueManager: ready -> asleep
[INFO:74497] DialogueManager: Automatically listening for wake word
[DEBUG:74496] DialogueManager: training_sentences -> ready
[INFO:74316] quart.serving: 192.168.86.32:59183 GET /api/sentences 1.1 200 1770 26052
[INFO:74311] quart.serving: 192.168.86.32:59182 GET /api/unknown-words 1.1 200 2 36076
[DEBUG:74221] rhasspynlu.ini_jsgf: Loaded ini file
[DEBUG:74212] train: Parsing ini file(s): ['/profiles/en/sentences.ini']
[DEBUG:74200] SnowboyWakeListener: listening -> loaded
[DEBUG:74198] DialogueManager: asleep -> training_sentences
[INFO:74196] __main__: Starting training
[INFO:72476] quart.serving: 192.168.86.32:59181 POST /api/sentences 1.1 200 52 280279
[DEBUG:72467] __main__: Writing /profiles/en/sentences.ini

Has anyone seen this before? It seems to be related to the ChangeLightState sentence. If I remove that, I am able to train it, but as soon as I put back the example, it fails.

Edit: Nevermind, I was able to fix the failed training issue.

What is your Google Wavenet Voice and language?
Not all voices have a male/female.

You have to check https://cloud.google.com/text-to-speech/docs/voices for a correct combination

Its English, and I’m trying to use male. How do I change country and gender? Would like UK English and male.

Nevermind, I found it in the documentation. I’ll try adding that and see if it works.

Edit: I was able to get it to work, although the UK is very Choppy. I’ll keep testing

Hey guys, what i want to do is to make my assistant ask me something when something happens, for example when i enter home (triggered by a motion sensor), i want that assistant ask me if he have to turn lights on, wating me for the answer (yes/no). Is that possibile with rhasspy and nodered?
Can i wake up rhasspy without any hotword but with motion sensor and waiting for some kind of input?

I’ve installed rhasspy with the add on method in home assistant, but i can’t open the webui. This is my log, wha’ts wrong?

DEBUG:main:Namespace(host=‘0.0.0.0’, log_level=‘DEBUG’, port=12101, profile=‘it’, set=, ssl=None, system_profiles=‘/usr/share/rhasspy/profiles’, user_profiles=‘/share/rhasspy/profiles’)
DEBUG:RhasspyCore:Loaded profile from /usr/share/rhasspy/profiles/it/profile.json
DEBUG:RhasspyCore:Profile files will be written to /share/rhasspy/profiles/it
DEBUG:root:Loading default profile settings from /usr/share/rhasspy/profiles/defaults.json
DEBUG:WebSocketObserver: → started
DEBUG:DialogueManager: → started
DEBUG:DialogueManager:started → loading
DEBUG:DialogueManager:Loading actors
DEBUG:DialogueManager:Actors created. Waiting for [‘recorder’, ‘player’, ‘speech’, ‘wake’, ‘command’, ‘decoder’, ‘recognizer’, ‘handler’, ‘speech_trainer’, ‘intent_trainer’, ‘word_pronouncer’] to start.
DEBUG:PyAudioRecorder: → started
DEBUG:APlayAudioPlayer: → started
DEBUG:DummyWakeListener: → started
DEBUG:EspeakSentenceSpeaker: → started
DEBUG:WebrtcvadCommandListener: → started
DEBUG:PocketsphinxDecoder: → started
DEBUG:FsticuffsRecognizer: → started
DEBUG:DummyIntentHandler: → started
DEBUG:PocketsphinxSpeechTrainer: → started
DEBUG:FsticuffsIntentTrainer: → started
DEBUG:PhonetisaurusPronounce: → started
DEBUG:DialogueManager:recorder started
DEBUG:EspeakSentenceSpeaker:started → ready
DEBUG:WebrtcvadCommandListener:started → loaded
WARNING:FsticuffsRecognizer:preload: [Errno 2] No such file or directory: ‘profiles/it/intent.json’
DEBUG:DialogueManager:player started
DEBUG:FsticuffsRecognizer:started → loaded
DEBUG:DialogueManager:wake started
DEBUG:DialogueManager:handler started
DEBUG:DialogueManager:speech_trainer started
DEBUG:DialogueManager:intent_trainer started
DEBUG:DialogueManager:word_pronouncer started
DEBUG:DialogueManager:command started
DEBUG:PocketsphinxDecoder:Loading decoder with hmm=profiles/it/acoustic_model, dict=profiles/it/dictionary.txt, lm=profiles/it/language_model.txt
DEBUG:DialogueManager:speech started
DEBUG:DialogueManager:recognizer started
WARNING:PocketsphinxDecoder:preload: new_Decoder returned -1
DEBUG:PocketsphinxDecoder:started → loaded
DEBUG:DialogueManager:decoder started
DEBUG:DialogueManager:Actors loaded
DEBUG:DialogueManager:loading → ready
INFO:DialogueManager:Automatically listening for wake word
DEBUG:DialogueManager:ready → asleep
DEBUG:InboxActor: → stopped
INFO:main:Started
DEBUG:main:Starting web server at http://0.0.0.0:12101
Running on https://0.0.0.0:12101 (CTRL + C to quit)
[2020-02-29 15:11:43,103] ASGI Framework Lifespan error, continuing without Lifespan support
WARNING:quart.serving:ASGI Framework Lifespan error, continuing without Lifespan support

Nevermind, i solved opening the port on my router…

Caution here, since there is NO login required, you are opening up your systems to the whole world.
I strongly suggest using Rhasspy webui on your local network ONLY

I get your point, but i can’t access on my local network since i have duckdns installed. There’s some kind of workaround?

You can just type the IP address of your Hassio and.or Rhasppy install when you are on your network.

Well no, i can’t access my server with ip address… I read somewhere that if i use duckdns, the server isn’t reacheble via local ip address. Am i wrong?

Yes, did you try?
If it is not working, it is some other problem.

Do you know what the local IP is?

I think the term you are looking for here is NAT loopback. If your router supports this you can use your duckdns address from your local network.
For example I have the official android app setup with my duckdns address and it doesn’t matter if I am home on my wifi or on the cell network. I connect the same either way.

Fuck me, you’re right :smiley:
I was using the button “open webui” from within the rhasspy addon page, and if i not forwarding the port it do not open. I’ve tried now with the ip address and it works without the port forwarding…
For the hass.io instance i never checked using https instead of http with the local address… my fault :smiley:

1 Like

And what about this? Rhasspy offline voice assistant toolkit

I’m trying without success :frowning:

Well, I think you should wait for 2.5 which has the Dialogue Manager implemented.
You can read some of the preview docs here: https://community.rhasspy.org/t/documentation-preview-for-2-5/516

Something broke after upgrade to latest hass.io 106.x and latest hassio-audio #9 and Rhasspy-addon 2.4.19
First: Porcupine module didn’t load:

ERROR:PorcupineWakeListener:loading wake handle
Traceback (most recent call last):
File “/usr/share/rhasspy/rhasspy/wake.py”, line 852, in in_started
self.load_handle()
File “/usr/share/rhasspy/rhasspy/wake.py”, line 936, in load_handle
sensitivities=self.sensitivities,
File “/usr/share/rhasspy/porcupine.py”, line 117, in init
raise self._PICOVOICE_STATUS_TO_EXCEPTION[status](‘initialization failed’)

Second: ALSA cards not available from container:

aplay: main:788: audio open error: No such file or directory
ERROR:APlayAudioPlayer:on_receive
Traceback (most recent call last):
File “/usr/share/rhasspy/rhasspy/actor.py”, line 175, in on_receive
self._state_method(message, sender)
File “/usr/share/rhasspy/rhasspy/audio_player.py”, line 67, in in_started
self.play_file(message.wav_path)
File “/usr/share/rhasspy/rhasspy/audio_player.py”, line 90, in play_file
subprocess.run(aplay_cmd, check=True)
File “/usr/lib/python3.6/subprocess.py”, line 438, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command ‘[‘aplay’, ‘-q’, ‘-D’, ‘’, ‘/share/rhasspy/profiles/ru/beep_hi.wav’]’ returned non-zero exit status 1.

root@75f2ff60-rhasspy:/# ls -al /proc/asound/
total 0
drwxrwxrwt 2 root root 40 Mar 12 15:45 .
dr-xr-xr-x 273 root root 0 Mar 12 15:45 …
root@75f2ff60-rhasspy:/#

I had similar issues.
Porcupine appears to have updated their ppn files.
I redownloaded my “jarvis.ppn” and now it is working normally.

Try redownloading whatever porcupine file you were using - likely it was updated (mine was about 2 months ago).

The second issue I think I had as well… I rebuilt everything in my profile and then my sound device wasn’t saving to profile.json. I updated it manually and it started working.

Looks like the profile for sound device is not saving correctly.
I haven’t created an issue on github yet, but think both points are valid.

DeadEnd

Thank you for help!
Trying to use redownloaded porcupine “.ppn” files - the same issue. In my case - bumblebee_linux.ppn and jarvis_linux.ppn

The second issue - before upgrade I could see name of soundcard devices on Rhasspy-addon page. Now I can see - only “Built-in Audio Analog Stereo”. As far as i could understand - hassio-audio addon creates this device.