Rhasspy 2.5.9 Released

Hot on the heels of 2.5.8, Rhasspy is now at 2.5.9.

The biggest change in this version is an upgrade of Mozilla’s DeepSpeech to version 0.9. And, thanks to the Jaco Polyglot, there are now DeepSpeech profiles for English, German, French, Spanish, Italian, and Polish. Additionally, DeepSpeech supports audio streaming like Kaldi, so it will be decoding as you speak :slight_smile:

After watching @itsMattShull on Twitch, I decided to make some web UI improvements for folks that are new to Rhasspy (apparently most people on Earth). I’ve tried to make it clearer when restarts are required, and when certain buttons on the home page won’t work – e.g., “Speak” does nothing if you have no text to speech system. I also made it so you can try different voices for some of the text to speech systems directly in the Settings page instead of save/restart each time.

Noisy environments can be a problem for Rhasspy :speak_no_evil:, since silence is needed to end a voice command. To help, I’ve added settings for energy-based silence detection (found in the speech to text settings). This lets you use different methods besides just VAD for detecting silence, such as the current debiased audio energy of the signal or a ratio of it and the maximum observed energy (or a fixed value). The rhasspy-silence project implements all this, and provides a command-line tool to check energy levels.

Lastly, if you didn’t see it, I made a wake word creator for snowboy that you can run on your desktop and create .pmdl files for your Pi’s. While porcupine is better in accuracy (and now at v1.9), custom wake words still expire.

Thanks, everyone! Here’s the complete changelog:

Added

  • Add DeepSpeech v0.9 profiles for English, German, French, Spanish, Italian, and Polish (Jaco)
  • Add streaming audio support for DeepSpeech (faster transcription)
  • Settings for energy-based silence detection
  • Max seconds for voice commands
  • English voice for Larynx (kathleen)
  • Reboot/shutdown menu in web UI
  • Add text to speech testing tools in settings page
  • Make it clearer in web UI when restarts are required
  • _site_id meta slot to Home Assistant intents/events (bk90)

Fixed

  • Custom converters for fsticuffs and fuzzywuzzy (thanks @arpagor62970)
  • fuzzywuzzy NluException: not enough values to unpack
  • Download links for all profiles

Changed

  • Upgrade to Mozilla DeepSpeech v0.9
  • Upgrade porcupine wake word system to 1.9
  • Move OpenAPI page from /api/ to /openapi/
  • Improved web UI for Raven keywords
14 Likes

Thanks for the update. The new Raven gui looks way better than the old one, but I managed to run into problems with it already

1 Like

Thanks, @Daenara. I’ll try and get this fixed as soon as possible. The timing of when the directory is scanned is part of my problem here :frowning:

Maybe try scanning directly after rhasspy starts/restarts if raven is the selected wakeword system. Since you need a restart to activate it that should help. Then, if stuff still doesn’t show up after changes (because you deleted a wakeword while using the system) just add a note to the gui to restart rhasspy if changes don’t appear automatically.

I’m not sure, if I had something to do with it ;).

It Seems that the deb package isnt updated. I installed the 2,5.9.deb and the Webinterface Said it is 2.5.8.

Please fix it :grin:

@synesthesiam thanks for the update! When going through the steps and running the follow run command:

docker run -it -p 12101:12101 --name rhasspy --restart unless-stopped -v “$HOME/.config/rhasspy/profiles:/profiles” -v “/etc/localtime:/etc/localtime:ro” --network=“host” --device /dev/snd:/dev/snd rhasspy/rhasspy --user-profiles /profiles --profile en

I end up getting an error but can’t figure out what’s going on:
> WARNING: Published ports are discarded when using host network mode

Starting up...
Using virtual environment at /usr/lib/rhasspy/.venv
DEBUG:rhasspysupervisor:Namespace(debug=True, docker_compose='', local_mqtt_port=12183, mosquitto_path='mosquitto', profile='en', supervisord_conf='supervisord.conf', system_profiles=None, user_profiles=PosixPath('/profiles'))
DEBUG:rhasspysupervisor:Loading profile en (user=/profiles, system=None)
DEBUG:rhasspyprofile.profile:Loading /usr/lib/rhasspy/rhasspy-profile/rhasspyprofile/profiles/en/profile.json
DEBUG:rhasspyprofile.profile:Loading /profiles/en/profile.json
DEBUG:rhasspysupervisor:Generating supervisord conf
DEBUG:rhasspysupervisor:Intent recognition disabled (system=dummy)
DEBUG:rhasspysupervisor:Intent handling disabled (system=dummy)
DEBUG:rhasspysupervisor:Wrote /profiles/en/supervisord.conf
Starting services...
Using virtual environment at /usr/lib/rhasspy/.venv
Using virtual environment at /usr/lib/rhasspy/.venv
2021-01-16 11:19:42,601 CRIT Supervisor is running as root.  Privileges were not dropped because no user is specified in the config file.  If you intend to run as root, you can set user=root in the config file to avoid this message.
2021-01-16 11:19:42,611 INFO supervisord started with pid 173
2021-01-16 11:19:43,620 INFO spawned: 'dialogue' with pid 189
2021-01-16 11:19:43,638 INFO spawned: 'speech_to_text' with pid 190
2021-01-16 11:19:43,648 INFO spawned: 'microphone' with pid 191
2021-01-16 11:19:43,660 INFO spawned: 'text_to_speech' with pid 194
2021-01-16 11:19:43,668 INFO spawned: 'wake_word' with pid 195
2021-01-16 11:19:43,697 INFO spawned: 'speakers' with pid 200
2021-01-16 11:19:44,701 INFO success: dialogue entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-01-16 11:19:44,702 INFO success: speech_to_text entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-01-16 11:19:44,703 INFO success: microphone entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-01-16 11:19:44,705 INFO success: text_to_speech entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-01-16 11:19:44,706 INFO success: wake_word entered RUNNING state, process has stayed 
up for > than 1 seconds (startsecs)
2021-01-16 11:19:44,708 INFO success: speakers entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
[DEBUG:2021-01-16 11:19:45,949] rhasspydialogue_hermes: Namespace(debug=True, group_separator=None, host='localhost', log_format='[%(levelname)s:%(asctime)s] %(name)s: %(message)s', no_sound=None, password=None, port=12183, session_timeout=30.0, site_id=['default'], sound=[['wake', '/usr/lib/rhasspy/etc/wav/beep_hi.wav'], ['recorded', '/usr/lib/rhasspy/etc/wav/beep_lo.wav'], ['error', '/usr/lib/rhasspy/etc/wav/beep_error.wav']], tls=False, tls_ca_certs=None, tls_cert_reqs='CERT_REQUIRED', tls_certfile=None, tls_ciphers=None, tls_keyfile=None, tls_version=None, username=None, volume=0.35, wakeword_id=None)
[DEBUG:2021-01-16 11:19:45,953] asyncio: Using selector: EpollSelector
[DEBUG:2021-01-16 11:19:45,965] rhasspydialogue_hermes: Connecting to localhost:12183     
Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/lib/rhasspy/rhasspy-dialogue-hermes/rhasspydialogue_hermes/__main__.py", line 89, in <module>
    main()
  File "/usr/lib/rhasspy/rhasspy-dialogue-hermes/rhasspydialogue_hermes/__main__.py", line 73, in main
    hermes_cli.connect(client, args)
  File "/usr/lib/rhasspy/rhasspy-hermes/rhasspyhermes/cli.py", line 93, in connect        
    client.connect(args.host, args.port)
  File "/usr/lib/rhasspy/.venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 937, in connect
    return self.reconnect()
  File "/usr/lib/rhasspy/.venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 1071, in reconnect
    sock = self._create_socket_connection()
  File "/usr/lib/rhasspy/.venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 3522, in _create_socket_connection
    return socket.create_connection(addr, source_address=source, timeout=self._keepalive) 
  File "/usr/lib/python3.7/socket.py", line 727, in create_connection
    raise err
  File "/usr/lib/python3.7/socket.py", line 716, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
[DEBUG:2021-01-16 11:19:46,254] rhasspyspeakers_cli_hermes: Namespace(debug=True, host='localhost', list_command='aplay -L', log_format='[%(levelname)s:%(asctime)s] %(name)s: %(message)s', password=None, play_command='aplay -q -t wav -D default:CARD=seeed2micvoicec', port=12183, site_id=['default'], tls=False, tls_ca_certs=None, tls_cert_reqs='CERT_REQUIRED', tls_certfile=None, tls_ciphers=None, tls_keyfile=None, tls_version=None, username=None, 
volume=0.5)
[DEBUG:2021-01-16 11:19:46,261] asyncio: Using selector: EpollSelector
[DEBUG:2021-01-16 11:19:46,275] rhasspyspeakers_cli_hermes: Connecting to localhost:12183
Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/lib/rhasspy/rhasspy-speakers-cli-hermes/rhasspyspeakers_cli_hermes/__main__.py", line 69, in <module>
    main()
  File "/usr/lib/rhasspy/rhasspy-speakers-cli-hermes/rhasspyspeakers_cli_hermes/__main__.py", line 53, in main
    hermes_cli.connect(client, args)
  File "/usr/lib/rhasspy/rhasspy-hermes/rhasspyhermes/cli.py", line 93, in connect        
    client.connect(args.host, args.port)
  File "/usr/lib/rhasspy/.venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 937, in connect
    return self.reconnect()
  File "/usr/lib/rhasspy/.venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 1071, in reconnect
    sock = self._create_socket_connection()
  File "/usr/lib/rhasspy/.venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 3522, in _create_socket_connection
    return socket.create_connection(addr, source_address=source, timeout=self._keepalive) 
  File "/usr/lib/python3.7/socket.py", line 727, in create_connection
    raise err
  File "/usr/lib/python3.7/socket.py", line 716, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused 

At first I thought it was because the MQTT server was still running on port 12183. So I stop it and tried again but it didn’t work. Any thoughts?

Opps, my mistake! Fixed the username.

2 Likes

I get this error on nuc

Starting up...
Using virtual environment at /usr/lib/rhasspy/.venv
DEBUG:rhasspysupervisor:Namespace(debug=True, docker_compose='', local_mqtt_port=12183, mosquitto_path='mosquitto', profile='en', supervisord_conf='supervisord.conf', system_profiles=None, user_profiles=PosixPath('/profiles'))
DEBUG:rhasspysupervisor:Loading profile en (user=/profiles, system=None)
DEBUG:rhasspyprofile.profile:Loading /usr/lib/rhasspy/rhasspy-profile/rhasspyprofile/profiles/en/profile.json
DEBUG:rhasspyprofile.profile:Loading /profiles/en/profile.json
DEBUG:rhasspysupervisor:Generating supervisord conf
DEBUG:rhasspysupervisor:Microphone disabled (system=dummy)
DEBUG:rhasspysupervisor:Speakers disabled (system=dummy)
DEBUG:rhasspysupervisor:Wake word disabled (system=dummy)
DEBUG:rhasspysupervisor:Intent handling disabled (system=dummy)
Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/lib/rhasspy/rhasspy-supervisor/rhasspysupervisor/__main__.py", line 109, in <module>
    main()
  File "/usr/lib/rhasspy/rhasspy-supervisor/rhasspysupervisor/__main__.py", line 89, in main
    mosquitto_path=args.mosquitto_path,
  File "/usr/lib/rhasspy/rhasspy-supervisor/rhasspysupervisor/__init__.py", line 183, in profile_to_conf
    mqtt_password=mqtt_password,
  File "/usr/lib/rhasspy/rhasspy-supervisor/rhasspysupervisor/__init__.py", line 2545, in print_text_to_speech
    mqtt_password,
  File "/usr/lib/rhasspy/rhasspy-supervisor/rhasspysupervisor/__init__.py", line 2094, in get_text_to_speech
    shlex.quote(" ".join(str(v) for v in picotts_command)),
UnboundLocalError: local variable 'picotts_command' referenced before assignment

and also this

TtsException: [Errno 2] No such file or directory: 'pico2wave': 'pico2wave'

Do we pull the Docker image for the update of the username? Sorry for the questions, first time updating.

OK, got it. Thank you! For now, change “picotts” in your profile to “nanotts”. It’s the same underlying program, but maintained on Github.

No, I just meant I edited the post with the username of the person who realized that custom converters weren’t working :slight_smile:

You’ll see this warning anytime you have --network='host' and a -p <port>:<port> (not used because it’s just attached directly to the host network).

I’m guessing you’re using an external MQTT broker on 12183? Just start it up again and everything should be fine.

Can you try doing a full refresh in the browser with CTRL + R? Sometimes the version “sticks” until you clear the cache.

Hello, I’m trying to install using git version (on aarch64/Raspberry Pi).
When i run make install, I get the following error, :

Requirement already satisfied: protobuf>=3.8.0 in /root/sources/rhasspy/.venv/lib/python3.7/site-packages (from tensorboardX->TTS==0.0.8) (3.14.0)
Building wheels for collected packages: TTS
  Building wheel for TTS (setup.py) ... done
  Created wheel for TTS: filename=TTS-0.0.8-cp37-cp37m-linux_aarch64.whl size=138016 sha256=30f57db265bc4a7b3a126dfbd4fab04fa2411441a2baf714da0e04c70f1676ff
  Stored in directory: /tmp/pip-ephem-wheel-cache-9cig2ipw/wheels/79/84/c4/0c58500327ad3f7465e601c0360ce979c8fcaa0cb4e69664e5
Successfully built TTS
Installing collected packages: TTS
Successfully installed TTS-0.0.8
Compiling core.pyx because it changed.
[1/1] Cythonizing core.pyx
/root/sources/rhasspy/.venv/lib/python3.7/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /root/sources/rhasspy/rhasspy-tts-larynx-hermes/larynx/TTS/TTS/tts/layers/glow_tts/monotonic_align/core.pyx
  tree = Parsing.p_module(s, pxd, full_module_name)
running install
running build
running build_ext
building 'TTS.tts.layers.glow_tts.monotonic_align.core' extension
creating build
creating build/temp.linux-aarch64-3.7
aarch64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/root/sources/rhasspy/.venv/lib/python3.7/site-packages/numpy/core/include -I/root/sources/rhasspy/.venv/include -I/usr/include/python3.7m -c core.c -o build/temp.linux-aarch64-3.7/core.o
In file included from /root/sources/rhasspy/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1822,
                 from /root/sources/rhasspy/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                 from /root/sources/rhasspy/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                 from core.c:623:
/root/sources/rhasspy/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
 #warning "Using deprecated NumPy API, disable it with " \
  ^~~~~~~
creating build/lib.linux-aarch64-3.7
creating build/lib.linux-aarch64-3.7/TTS
creating build/lib.linux-aarch64-3.7/TTS/tts
creating build/lib.linux-aarch64-3.7/TTS/tts/layers
creating build/lib.linux-aarch64-3.7/TTS/tts/layers/glow_tts
creating build/lib.linux-aarch64-3.7/TTS/tts/layers/glow_tts/monotonic_align
aarch64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-aarch64-3.7/core.o -o build/lib.linux-aarch64-3.7/TTS/tts/layers/glow_tts/monotonic_align/core.cpython-37m-aarch64-linux-gnu.so
running install_lib
copying build/lib.linux-aarch64-3.7/TTS/tts/layers/glow_tts/monotonic_align/core.cpython-37m-aarch64-linux-gnu.so -> /root/sources/rhasspy/.venv/lib/python3.7/site-packages/TTS/tts/layers/glow_tts/monotonic_align
running install_egg_info
Writing /root/sources/rhasspy/.venv/lib/python3.7/site-packages/monotonic_align-0.0.0.egg-info
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: flask==1.1.2 in /root/sources/rhasspy/.venv/lib/python3.7/site-packages (from -r requirements.txt (line 1)) (1.1.2)
ERROR: Could not find a version that satisfies the requirement gruut~=0.5.0
ERROR: No matching distribution found for gruut~=0.5.0
make: *** [Makefile:177: install-rhasspy] Error 1

Hmmm…the Makefile is supposed to download gruut; not sure why it’s failing. Here’s where you can download it: https://github.com/rhasspy/gruut/releases

Do you see anything in your download directory in the root of the git repo?

Yes
rhasspy# find . -iname “gruut
./download/gruut-0.5.0.tar.gz

I thought it started a MQTT broker when the Docker image was run? I guess I didn’t have to do anything else last time. That’s why I’m confused why it’s not starting the MQTT broker on 12183.

The warning I’m good with, it’s the connection errors in the log I’m referring too.

Those are fine as long as it eventually starts up. The MQTT broker starts first, but isn’t ready by the time other services get started. They’re all programed to try connecting several times with a delay before giving up.

Alright got it. Kept restarting the container and it didn’t work. Then I rebooted and it came up fine!

1 Like