thanks will give it a try
doing that for me in a LinuxMint 21.1 Virtualbox VM
“make install” failed here…
Collecting lxml==4.6.3
Downloading lxml-4.6.3.tar.gz (3.2 MB)
|████████████████████████████████| 3.2 MB 8.3 MB/s
ERROR: Command errored out with exit status 1:
command: /home/sass/Documents/saytoshi/rhasspy/.venv/bin/python -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/tmp/pip-install-tdl6imqy/lxml/setup.py’“'”‘; file=’“'”‘/tmp/pip-install-tdl6imqy/lxml/setup.py’“'”‘;f=getattr(tokenize, ‘"’“‘open’”’“‘, open)(file);code=f.read().replace(’”‘"’\r\n’“'”‘, ‘"’"’\n’“'”‘);f.close();exec(compile(code, file, ‘"’“‘exec’”’"‘))’ egg_info --egg-base /tmp/pip-pip-egg-info-01zgr71p
cwd: /tmp/pip-install-tdl6imqy/lxml/
Complete output (3 lines):
Building lxml version 4.6.3.
Building without Cython.
Error: Please make sure the libxml2 and libxslt development packages are installed.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
WARNING: You are using pip version 20.2.4; however, version 22.3.1 is available.
You should consider upgrading via the ‘/home/sass/Documents/saytoshi/rhasspy/.venv/bin/python -m pip install --upgrade pip’ command.
make: *** [Makefile:176: install-rhasspy] Error 1
Installed these, now getting past that part:
sudo apt-get install gfortran libgfortran5 python3-lxml libxml2-dev libxslt-dev libffi-dev
make install
still trying to complete “make install”
Makefile should still have one line to install cython and another to install typed-ast==1.4.3
Sorry, I guess I wasn’t clear. I copied the cython line and on the new line I changed “cython” to “typed-ast==1.4.3”
@GregD well maybe made some progress here at least fixing that above error, and at least got something to run. Again, this was a build/run in a LinuxMint 21.1 VM on VirtualBox.
File “/home/sass/Documents/saytoshi/rhasspy/rhasspy-profile/rhasspyprofile/profile.py”, line 235, in recursive_update
if isinstance(v, collections.Mapping) and (k in base_dict):
AttributeError: module ‘collections’ has no attribute ‘Mapping’
$ xed rhasspy-profile/rhasspyprofile/profile.py &
#profile.py line 235 change
- if isinstance(v, collections.Mapping) and (k in base_dict):
+ if isinstance(v, collections.abc.Mapping) and (k in base_dict):
$ ./rhasspy.sh --profile en
Starting up…
Using virtual environment at /home/sass/Documents/saytoshi/rhasspy/.venv
DEBUG:rhasspysupervisor:Namespace(profile=‘en’, system_profiles=None, user_profiles=PosixPath(‘/home/sass/.config/rhasspy/profiles’), supervisord_conf=‘supervisord.conf’, docker_compose=‘’, local_mqtt_port=12183, mosquitto_path=‘mosquitto’, debug=True)
DEBUG:rhasspysupervisor:Loading profile en (user=/home/sass/.config/rhasspy/profiles, system=None)
DEBUG:rhasspyprofile.profile:Loading /home/sass/Documents/saytoshi/rhasspy/rhasspy-profile/rhasspyprofile/profiles/en/profile.json
DEBUG:rhasspyprofile.profile:Loading /home/sass/.config/rhasspy/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:Speech to text disabled (system=dummy)
DEBUG:rhasspysupervisor:Intent recognition disabled (system=dummy)
DEBUG:rhasspysupervisor:Intent handling disabled (system=dummy)
DEBUG:rhasspysupervisor:Text to speech disabled (system=dummy)
DEBUG:rhasspysupervisor:Dialogue disabled (system=dummy)
DEBUG:rhasspysupervisor:Wrote /home/sass/.config/rhasspy/profiles/en/supervisord.conf
Starting services…
Using virtual environment at /home/sass/Documents/saytoshi/rhasspy/.venv
Using virtual environment at /home/sass/Documents/saytoshi/rhasspy/.venv
2022-12-30 16:57:41,002 INFO supervisord started with pid 7553
Traceback (most recent call last):
File “/usr/lib/python3.10/runpy.py”, line 187, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File “/usr/lib/python3.10/runpy.py”, line 146, in _get_module_details
return _get_module_details(pkg_main_name, error)
File “/usr/lib/python3.10/runpy.py”, line 110, in _get_module_details
import(pkg_name)
File “/home/sass/Documents/saytoshi/rhasspy/rhasspy-server-hermes/rhasspyserver_hermes/init.py”, line 17, in
import rhasspynlu
File “/home/sass/Documents/saytoshi/rhasspy/rhasspy-nlu/rhasspynlu/init.py”, line 2, in
from .arpa_lm import arpa_to_fst, fst_to_arpa, graph_to_arpa, graph_to_arpa_small
File “/home/sass/Documents/saytoshi/rhasspy/rhasspy-nlu/rhasspynlu/arpa_lm.py”, line 10, in
import networkx as nx
File “/home/sass/Documents/saytoshi/rhasspy/.venv/lib/python3.10/site-packages/networkx/init.py”, line 115, in
import networkx.readwrite
File “/home/sass/Documents/saytoshi/rhasspy/.venv/lib/python3.10/site-packages/networkx/readwrite/init.py”, line 15, in
from networkx.readwrite.graphml import *
File “/home/sass/Documents/saytoshi/rhasspy/.venv/lib/python3.10/site-packages/networkx/readwrite/graphml.py”, line 314, in
class GraphML(object):
File “/home/sass/Documents/saytoshi/rhasspy/.venv/lib/python3.10/site-packages/networkx/readwrite/graphml.py”, line 346, in GraphML
(np.int, “int”), (np.int8, “int”),
File “/home/sass/Documents/saytoshi/rhasspy/.venv/lib/python3.10/site-packages/numpy/init.py”, line 284, in getattr
raise AttributeError("module {!r} has no attribute "
AttributeError: module ‘numpy’ has no attribute ‘int’. Did you mean: ‘inf’?
2022-12-30 16:57:42,021 INFO spawned: ‘mqtt’ with pid 7565
1672430262: mosquitto version 2.0.11 starting
1672430262: Using default config.
1672430262: Starting in local only mode. Connections will only be possible from clients running on this machine.
1672430262: Create a configuration file which defines a listener to allow remote access.
1672430262: For more details see Authentication methods | Eclipse Mosquitto
1672430262: Opening ipv4 listen socket on port 12183.
1672430262: Opening ipv6 listen socket on port 12183.
1672430262: mosquitto version 2.0.11 running
2022-12-30 16:57:43,065 INFO success: mqtt entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
OK I managed to get it running but don’t know yet if it works, but at least I got the web admin page to load. A lot of things were broken in the build. Here’s various things I did.
#//// try this first, then below two edits if it doesn’t work.
$ ./.venv/bin/pip install -U networkx
Collecting networkx
Using cached networkx-2.8.8-py3-none-any.whl (2.0 MB)
#remove the inclusion of np.float, np.int in these files.
#better to determine the correct networkx package version to use TBD:
xed ./.venv/lib/python3.10/site-packages/networkx/readwrite/graphml.py &
xed ./.venv/lib/python3.10/site-packages/networkx/readwrite/gexf.py &
$ ./.venv/bin/pip uninstall markupsafe
$ ./.venv/bin/pip install markupsafe==2.0.1
$ ./.venv/bin/pip install -U aiohttp
$ ./.venv/bin/pip install -U discord
$ ./.venv/bin/pip install -U hypercorn
$ ./rhasspy.sh --profile en
Starting up…
Using virtual environment at /home/sass/Documents/saytoshi/rhasspy/.venv
DEBUG:rhasspysupervisor:Namespace(profile=‘en’, system_profiles=None, user_profiles=PosixPath(‘/home/sass/.config/rhasspy/profiles’), supervisord_conf=‘supervisord.conf’, docker_compose=‘’, local_mqtt_port=12183, mosquitto_path=‘mosquitto’, debug=True)
DEBUG:rhasspysupervisor:Loading profile en (user=/home/sass/.config/rhasspy/profiles, system=None)
DEBUG:rhasspyprofile.profile:Loading /home/sass/Documents/saytoshi/rhasspy/rhasspy-profile/rhasspyprofile/profiles/en/profile.json
DEBUG:rhasspyprofile.profile:Loading /home/sass/.config/rhasspy/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:Speech to text disabled (system=dummy)
DEBUG:rhasspysupervisor:Intent recognition disabled (system=dummy)
DEBUG:rhasspysupervisor:Intent handling disabled (system=dummy)
DEBUG:rhasspysupervisor:Text to speech disabled (system=dummy)
DEBUG:rhasspysupervisor:Dialogue disabled (system=dummy)
DEBUG:rhasspysupervisor:Wrote /home/sass/.config/rhasspy/profiles/en/supervisord.conf
Starting services…
Using virtual environment at /home/sass/Documents/saytoshi/rhasspy/.venv
Using virtual environment at /home/sass/Documents/saytoshi/rhasspy/.venv
2022-12-31 17:43:22,969 INFO supervisord started with pid 15336
/home/sass/Documents/saytoshi/rhasspy/rhasspy-server-hermes/rhasspyserver_hermes/main.py:89: DeprecationWarning: There is no current event loop
_LOOP = asyncio.get_event_loop()
Unable to detect CPU capabilities
[DEBUG:2022-12-31 17:43:23,443] rhasspyserver_hermes: Namespace(profile=‘en’, host=‘0.0.0.0’, port=12101, url_root=‘’, mqtt_host=None, mqtt_port=None, mqtt_username=None, mqtt_password=None, local_mqtt_port=12183, system_profiles=None, user_profiles=‘/home/sass/.config/rhasspy/profiles’, set=[], certfile=None, keyfile=None, log_level=‘DEBUG’, log_format=‘[%(levelname)s:%(asctime)s] %(name)s: %(message)s’, web_dir=‘/home/sass/Documents/saytoshi/rhasspy/rhasspy-server-hermes/web’)
/home/sass/Documents/saytoshi/rhasspy/rhasspy-server-hermes/rhasspyserver_hermes/main.py:204: DeprecationWarning: ssl.SSLContext() without protocol argument is deprecated.
ssl_context = ssl.SSLContext()
/home/sass/Documents/saytoshi/rhasspy/rhasspy-server-hermes/rhasspyserver_hermes/main.py:204: DeprecationWarning: ssl.PROTOCOL_TLS is deprecated
ssl_context = ssl.SSLContext()
[DEBUG:2022-12-31 17:43:23,501] rhasspyprofile.profile: Loading /home/sass/Documents/saytoshi/rhasspy/rhasspy-profile/rhasspyprofile/profiles/en/profile.json
[DEBUG:2022-12-31 17:43:23,502] rhasspyprofile.profile: Loading /home/sass/.config/rhasspy/profiles/en/profile.json
[DEBUG:2022-12-31 17:43:23,502] rhasspyprofile.profile: Loading default profile settings from /home/sass/Documents/saytoshi/rhasspy/rhasspy-profile/rhasspyprofile/profiles/defaults.json
[DEBUG:2022-12-31 17:43:23,503] rhasspyserver_hermes: Starting core
[DEBUG:2022-12-31 17:43:23,503] rhasspyserver_hermes: Connecting to localhost:12183 (retries: 0/10)
[ERROR:2022-12-31 17:43:23,505] rhasspyserver_hermes: mqtt connect
Traceback (most recent call last):
File “/home/sass/Documents/saytoshi/rhasspy/rhasspy-server-hermes/rhasspyserver_hermes/init.py”, line 290, in start
self.client.connect(self.host, self.port)
File “/home/sass/Documents/saytoshi/rhasspy/.venv/lib/python3.10/site-packages/paho/mqtt/client.py”, line 937, in connect
return self.reconnect()
File “/home/sass/Documents/saytoshi/rhasspy/.venv/lib/python3.10/site-packages/paho/mqtt/client.py”, line 1071, in reconnect
sock = self._create_socket_connection()
File “/home/sass/Documents/saytoshi/rhasspy/.venv/lib/python3.10/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.10/socket.py”, line 845, in create_connection
raise err
File “/usr/lib/python3.10/socket.py”, line 833, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
2022-12-31 17:43:23,978 INFO spawned: ‘mqtt’ with pid 15345
1672519404: mosquitto version 2.0.11 starting
1672519404: Using default config.
1672519404: Starting in local only mode. Connections will only be possible from clients running on this machine.
1672519404: Create a configuration file which defines a listener to allow remote access.
1672519404: For more details see Authentication methods | Eclipse Mosquitto
1672519404: Opening ipv4 listen socket on port 12183.
1672519404: Opening ipv6 listen socket on port 12183.
1672519404: mosquitto version 2.0.11 running
[DEBUG:2022-12-31 17:43:24,509] rhasspyserver_hermes: Connecting to localhost:12183 (retries: 1/10)
1672519404: New connection from 127.0.0.1:39953 on port 12183.
1672519404: New client connected from 127.0.0.1:39953 as auto-A504A6D1-E466-C411-6915-9DCEAED0729C (p2, c1, k60).
[DEBUG:2022-12-31 17:43:24,521] rhasspyserver_hermes: Connected to MQTT broker
[DEBUG:2022-12-31 17:43:24,522] rhasspyserver_hermes: Subscribed to hermes/hotword/+/detected
[DEBUG:2022-12-31 17:43:24,522] rhasspyserver_hermes: Subscribed to hermes/asr/textCaptured
[DEBUG:2022-12-31 17:43:24,523] rhasspyserver_hermes: Subscribed to hermes/intent/#
[DEBUG:2022-12-31 17:43:24,524] rhasspyserver_hermes: Subscribed to hermes/nlu/intentNotRecognized
[DEBUG:2022-12-31 17:43:24,524] rhasspyserver_hermes: Subscribed to rhasspy/asr/default/+/audioCaptured
[DEBUG:2022-12-31 17:43:24,524] rhasspyserver_hermes: Subscribed to hermes/audioServer/default/audioSummary
[DEBUG:2022-12-31 17:43:24,525] rhasspyserver_hermes: Subscribed to hermes/intent/#
[DEBUG:2022-12-31 17:43:24,526] rhasspyserver_hermes: Subscribed to hermes/nlu/intentNotRecognized
[DEBUG:2022-12-31 17:43:24,526] rhasspyserver_hermes: Subscribed to hermes/audioServer/default/audioSummary
[DEBUG:2022-12-31 17:43:24,526] rhasspyserver_hermes: Subscribed to hermes/asr/textCaptured
[DEBUG:2022-12-31 17:43:24,527] rhasspyserver_hermes: Subscribed to hermes/hotword/+/detected
[DEBUG:2022-12-31 17:43:24,528] rhasspyserver_hermes: Subscribed to rhasspy/asr/default/+/audioCaptured
[INFO:2022-12-31 17:43:24,528] rhasspyserver_hermes: Started
[DEBUG:2022-12-31 17:43:24,529] rhasspyserver_hermes: Starting web server at http://0.0.0.0:12101
[2022-12-31 17:43:24 -0300] [15335] [INFO] Running on http://0.0.0.0:12101 (CTRL + C to quit)
[INFO:2022-12-31 17:43:24,538] hypercorn.error: Running on http://0.0.0.0:12101 (CTRL + C to quit)
2022-12-31 17:43:25,530 INFO success: mqtt entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
TTS is working now but not STT/ASR
I ran into the same issues with the networkx dependency interacting with numpy as well as the jinja2 dependency interacting with some transitive dependencies. The solution I found was to add an explicit entry for numpy==1.20.1 in requirements.txt files that depended on networkx instead of relying on pip pulling in some newer version. Ideally we could update these dependencies to newer versions.
The same solution works for jinja2 by fixing the transitive dependency markupsafe. I am willing to create the PR in the 10 or so projects that require these changes, but I wasn’t sure they would be merged. I created one PR here:
but the project hasn’t had any commits since June 2021. Is this project still actively maintained?
I went ahead and created the PRs for all the repositories that address the build issues discussed here:
- /rhasspy/rhasspy-snips-nlu-hermes/pull/2
- /rhasspy/rhasspy-snips-nlu/pull/2
- /rhasspy/rhasspy-server-hermes/pull/33
- /rhasspy/rhasspy-nlu-hermes/pull/4
- /rhasspy/rhasspy-nlu/pull/18
- /rhasspy/rhasspy-fuzzywuzzy-hermes/pull/2
- /rhasspy/rhasspy-fuzzywuzzy/pull/5
- /rhasspy/rhasspy-asr-vosk-hermes/pull/1
- /rhasspy/rhasspy-asr-pocketsphinx-hermes/pull/3
- /rhasspy/rhasspy-asr-pocketsphinx/pull/1
- /rhasspy/rhasspy-asr-kaldi-hermes/pull/1
- /rhasspy/rhasspy-asr-kaldi/pull/3
- /rhasspy/rhasspy/pull/315
I think it’s is but infrequently as @synesthesiam is busy working with Nabu Casa now and their Home-Assistant priorities.
As @fluidvoice mentioned, it has been infrequent since I changed jobs in 2021 (and then again in 2022).
When I have time, I’ve spent it working towards Rhasspy version 3. I am purposely keeping services/tools external to the core in version 3, using isolated virtual environments (or just calling pre-compiled programs directly).
Thanks for the reply. I didn’t want to spend effort if it wasn’t the right path forward. Should I be working with version 3? Is that available somewhere? Sorry if this is documented somewhere. Just trying to get my local setup and encountering various issues that I can help with.
It’s not available just yet, but I’m getting closer every day
I’d be curious to hear about your use case for Rhasspy. Are you using it as a self-contained voice assistant on a single machine, as a server with satellites, or just as an API backend to open source voice services?
Hi @synesthesiam
I want to create skills for non home automation uses in the fastest way possible.
My ideal config would be one simple pre-configured STT/TTS server (English by default) that I can spin up in a LXD/lxc container or on a local or hosted Pi4 and a USB mic or an Android phone app for audio over MQTT. Meaning, no setup/config GUI but instead just a config file to be edited, with the goal to reduce time to download or build. Eg. spin up an LXC container and run a script to download a pre-configured Rhasspy for English or some other lang set to use ALSA/Pulseaudio audio in/out.
The objective is get to a working server and audio in/out state as quick as possible for skills development.
Maybe a second pre-configured setup (or simple config file edit) for a cloud hosted VM or RPi4 which uses a MQTT enabled client app on a mobile phone.
I think you mentioned v3 will be more modular so maybe this will help the above and also for people to be able to build and contribute to the less “monolithic” Rhasspy
exactly. I wasted enough time trying to figure out how to get v2.5 to build.
And I don’t even care about 80% of it. The GUI, the various different STT/TTS engines and spoken languages. I just want something easily buildable that has good ASR/TTS performance in English/etc. and I can use to create skills and hack on to experiment with integrations and app ideas.
Personally being completely new to Python I found the building of this app to be a nightmare of broken dependencies as shown above. Hopefully the modular v3 will help this some.
If you want to start learning the language and writing skills then it’s a big overhead.
Docker is another similar story. If you’re new to it, then getting it to work and debugging problems is a total PITA. I found learning how to use LXD/LXC containers much more straight forward.
My intention is to simply turn on or off a light in home assistant with my voice without going to the cloud. I don’t intend to use satellites or anything.
@fluidvoice I think v3 is exactly what you’ll want. Only install what you need, and all of the services just have the bare minimum of what they need to run.
@chrismiceli What I’ll be working on for Nabu Cases for the Year of Voice may be more of an interest to you. We already have an intent recognizer built into Home Assistant now, and we’re planning to automate the installation of STT/TTS add-ons so you can have it all “just work”. Sort of like Rhasspy Junior but for more than just English.
@synesthesiam Thanks for the reply Mike, and for all that you have done and are doing for the open source and “can’t be evil” (don’t spy on me) speech assistant space. I feel like you’re one of the few technically savvy people fighting the gorillas that have held back speech rec for soo long via hording the talent, code and speech models. ie; Microsoft, Google, and Amazon all of which have been acquiring the smaller ASR, TTS companies for over 20 years. Hearing about Alexa losing billions of $ I felt like it was kinda justified karma-esque rewards. Long term my hope is open source speech tech wins in a similar fashion to Linux.
I very much look forward to v3 being released, and will try to help the project however I can.
Cheers, Brad.
@synesthesiam Mike, any idea when even an alpha of v3 will be released?
It would be great if even one single working English STT + TTS config was released so we could test/hack on it, and be able to write skills… if not also help out in some way.
In my use case I have an Intel Atom system running other services in addition to a Raspberry Pi running HassOS/HA. I see many advantages to NOT run Rhasspy on an RPi/HA server if there are other physical servers available. The one downside is that I had to run Rhasspy on a VM running an older version of Debian. I also discovered that some audio hardware that works in Debian does NOT work in a Debian VM. On the up side Rhasspy has been locking up its VM every week or so, and this affects only Rhasspy and none of the other services I’m running.
In the beginning I tried Rhasspy in a Docker container. That failed immediately due to Docker issues, and the Docker documentation I could find was completely inadequate. I find linux VM technology easier to learn and debug; googling for info was simply more effective.
In my case I use Rhasspy to handle voice command input and TTS output for my music server (Logitech Media Server / Squeezebox). It also does timers, and tells me the time and temperatures.