Rhasspy 2.5 Pre-Release

Try doing the clone with git clone --recurse-submodules instead of git clone --recursive

I’m occasionally getting issues where one or more submodules fail to get pulled. Running a git submodule update and then going to any empty rhasspy-* directories and running git checkout master seems to do the trick.

Any Git guru who can explain what’s going on?

@synesthesiam, cool that got me further.

So I am trying to run it with the nl profile. At this moment I am unable to train as I get the following error:
Command ‘fstcompile --keep_isymbols --keep_osymbols --isymbols=/tmp/tmprmh5e11y/isymbols.txt --osymbols=/tmp/tmprmh5e11y/osymbols.txt /tmp/tmprmh5e11y/graph.fst.txt “/tmp/tmprmh5e11y/graph.fst.fst”’ returned non-zero exit status 127.

On the console I see the folllowing:
[DEBUG:2020-03-23 22:19:24,097] rhasspynlu.arpa_lm: compile_fst: fstcompile --keep_isymbols --keep_osymbols --isymbols=/tmp/tmprmh5e11y/isymbols.txt --osymbols=/tmp/tmprmh5e11y/osymbols.txt /tmp/tmprmh5e11y/graph.fst.txt “/tmp/tmprmh5e11y/graph.fst.fst”
/bin/sh: 1: fstcompile: not found

In my 2.4 I see fstcompile installed in:
vandaag@speech:~/rhasspy$ find . -name fstcompile -print
./.venv/bin/fstcompile
./opt/kaldi/tools/openfst/bin/fstcompile

Next to this is that I also see the following entries:
2020-03-23 22:22:18,793 INFO spawnerr: can’t find command ‘mosquitto’
2020-03-23 22:22:18,793 INFO success: intent_recognition entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-03-23 22:22:18,793 INFO success: speech_to_text entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-03-23 22:22:18,793 INFO success: dialogue entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-03-23 22:22:20,796 INFO spawnerr: can’t find command ‘mosquitto’
2020-03-23 22:22:23,800 INFO spawnerr: can’t find command ‘mosquitto’
2020-03-23 22:22:23,800 INFO gave up: mqtt entered FATAL state, too many start retries too quickly

But I am unable to identify which process is trying to execute mosquitto.

Any advise again?

Yes, forgot to add libfst-tools and libngram-tools to the list of required packages to install. I’ve also updated the Makefile in rhasspy-voltron to automatically detect and repair failed checkouts.

Thanks!

After a reinstall the training issue is fixed and all seem to be working fine.

The only thing I still see is:
2020-03-23 22:51:47,335 INFO spawnerr: can’t find command ‘mosquitto’
2020-03-23 22:51:47,336 INFO gave up: mqtt entered FATAL state, too many start retries too quickly

Is there any way to identify what is causing this? At this moment I only have the intent recognition and the Dialogue Management active.

Thanks.

Something else I had to install on a raspberry pi zero is libatlas-base-dev or the make file would fail when installing Snowboy.

Some more observations with regards to the rhasspy-satellite that I hope are useful.

First of all I was no longer able to execute the installation because now the make command fails due to an issue with rapidfuzzy. By manually editing the requirements.txt and bumping the version to currently the latest (0.2.2), it works. The previous bump to from 0.1.0 to 0.2.1 might have caused this.

Next I have an issue to get it working using a systemd service. When run the satellite on the commandline like the documentation states:

bin/rhasspy-satellite --profile nl

Then the internal mosquitto instance is started and listening on 12183. When I place this however in a systemd service file as follows, the internal mqtt broker is not started, also resulting in debug message related to mqtt connectivity.

ExecStart=/bin/bash -lc '/home/pi/rhasspy-satellite/bin/rhasspy-satellite --profile nl'

@geoffrey hm strange between 0.2.1 and 0.2.2 I only added the license text file to the tarball :thinking:
Can you send me the error message? I suppose it failed compiling for some reason, since it is required to build the wheel e.g. on the raspberry pi (since arm is not part of the manylinux spec -> can not be uploaded to pypi)

Sure thing @maxbachmann.

  Building wheel for rapidfuzz (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/pi/rhasspy-satellite/.venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-9kbwk31k/rapidfuzz/setup.py'"'"'; __file__='"'"'/tmp/pip-install-9kbwk31k/rapidfuzz/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-b951tl28
       cwd: /tmp/pip-install-9kbwk31k/rapidfuzz/
  Complete output (32 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-armv6l-3.7
  creating build/lib.linux-armv6l-3.7/rapidfuzz
  copying python/src/rapidfuzz/__init__.py -> build/lib.linux-armv6l-3.7/rapidfuzz
  copying python/src/rapidfuzz/fuzz.py -> build/lib.linux-armv6l-3.7/rapidfuzz
  copying python/src/rapidfuzz/process.py -> build/lib.linux-armv6l-3.7/rapidfuzz
  running egg_info
  writing python/src/rapidfuzz.egg-info/PKG-INFO
  writing dependency_links to python/src/rapidfuzz.egg-info/dependency_links.txt
  writing requirements to python/src/rapidfuzz.egg-info/requires.txt
  writing top-level names to python/src/rapidfuzz.egg-info/top_level.txt
  reading manifest file 'python/src/rapidfuzz.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  writing manifest file 'python/src/rapidfuzz.egg-info/SOURCES.txt'
  running build_ext
  creating tmp
  arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/pi/rhasspy-satellite/.venv/include -I/usr/include/python3.7m -c /tmp/tmpp3epgc44.cpp -o tmp/tmpp3epgc44.o -fvisibility=hidden
  building '_rapidfuzz_cpp' extension
  creating build/temp.linux-armv6l-3.7
  creating build/temp.linux-armv6l-3.7/python
  creating build/temp.linux-armv6l-3.7/python/src
  creating build/temp.linux-armv6l-3.7/cpp
  creating build/temp.linux-armv6l-3.7/cpp/src
  arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/pi/rhasspy-satellite/.venv/include/site/python3.7 -I/home/pi/rhasspy-satellite/.venv/include/site/python3.7 -Icpp/src -I/home/pi/rhasspy-satellite/.venv/include -I/usr/include/python3.7m -c python/src/rapidfuzz.cpp -o build/temp.linux-armv6l-3.7/python/src/rapidfuzz.o -O3 -std=c++17 -DVERSION_INFO="0.2.1" -fvisibility=hidden
  python/src/rapidfuzz.cpp:1:10: fatal error: pybind11/pybind11.h: No such file or directory
   #include <pybind11/pybind11.h>
            ^~~~~~~~~~~~~~~~~~~~~
  compilation terminated.
  error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for rapidfuzz
  Running setup.py clean for rapidfuzz

Hopefully this gives you some insights.

Hm yes I have seen this before but could not track it down yet. Basically I use pybind11 to build the python lib from c++. However in some cases apparently it does get confused where the pybind sources are placed and therefore fails compiling. The same issue exists when compiling with travis, but e.g. not with github actions :thinking:
While for most platforms I can provide prebuild wheels I can’t do this for arm since pypi does not support arm wheels. Well still confused why it worked in one version and not in the other one even though I did not change this …

1 Like

It works for now, so one less to tackle for me :blush:

Thank you for having a look at it.

1 Like

I get this error all the time, but it seems inconsequential. rapidfuzz seems to work for me either way :slight_smile: I’ve seen this happen with pip sometimes when trying to install things in parallel. I’ve had to sequence the pip install commands for some things to get it to build right.

Even though I already became quite familiar with the components of Rhasspy, this one was new for me, so I had no idea if it would break things or not.

In helping out with the beta testing I also came across the MQTT issues I described and try to tackle them one by one :blush:

At the moment I have the rhasspy-satellite running in a screen session until I figure out the systemd issue I have and it’s communicating to the server using the HTTP API.

Next up is getting the RPi Zero entirely correctly setup with the Seeed Respeaker 2.

1 Like

Thank you for all the testing help! I suspect the systemd service issue is something to do with pathing. I use supervisord to run Rhasspy’s services, and it calls mosquitto without an absolute path. I manipulate $PATH in the rhasspy-voltron script to get the other rhasspy-* scripts resolved correct, but maybe you have to manually add /usr/bin to $PATH in your service file?

It looks like that the mosquitto error originates from the mqtt service, because I got the following error:
2020-03-24 16:38:15,550 INFO gave up: mqtt entered FATAL state, too many start retries too quickly

After I changed the mqtt service to use an external server and pointed it to the localhost and the correct port, the error disappeared

Did you have to do anything with the PATH variable to get this service working?

I have an RPi zero with a respeaker 2 mic as well, but using your example for /etc/systemd/system/rhasspy.service or any other example gives me the issue that e.g. the mosquitto executable in /usr/sbin/mosquitto is not found.

Hi @geoffrey, I always install mosquitto by ‘sudo apt-get install mosquitto’

I have now activated Speech to text Kaldi and I am getting the following error:

bash: /home/vandaag/rhasspy-voltron/rhasspy-asr-kaldi/rhasspyasr_kaldi/kaldi/egs/wsj/s5/utils/prepare_lang.sh: No such file or directory
[ERROR:2020-03-24 19:49:56,528] rhasspyasr_kaldi_hermes: train
Traceback (most recent call last):
File “/home/vandaag/rhasspy-voltron/rhasspy-asr-kaldi-hermes/rhasspyasr_kaldi_hermes/init.py”, line 477, in handle_train
missing_words_path=self.unknown_words,
File “/home/vandaag/rhasspy-voltron/rhasspy-asr-kaldi/rhasspyasr_kaldi/train.py”, line 85, in train
model_dir, graph_dir, dictionary, language_model, kaldi_dir=kaldi_dir
File “/home/vandaag/rhasspy-voltron/rhasspy-asr-kaldi/rhasspyasr_kaldi/train.py”, line 183, in train_kaldi
subprocess.check_call(prepare_lang, cwd=model_dir, env=extended_env)
File “/usr/lib/python3.7/subprocess.py”, line 347, in check_call
raise CalledProcessError(retcode, cmd)

and

[ERROR:2020-03-24 19:49:56,567] rhasspyserver_hermes: AsrError(error=“Command ‘[‘bash’, ‘/home/vandaag/rhasspy-voltron/rhasspy-asr-kaldi/rhasspyasr_kaldi/kaldi/egs/wsj/s5/utils/prepare_lang.sh’, ‘/home/vandaag/.config/rhasspy/profiles/nl/kaldi/model/data/local/dict’, ‘’, ‘/home/vandaag/.config/rhasspy/profiles/nl/kaldi/model/data/local/lang’, ‘/home/vandaag/.config/rhasspy/profiles/nl/kaldi/model/data/lang’]’ returned non-zero exit status 127.”, context=’’, siteId=‘default’, sessionId=‘601bafca-c9d5-4476-905a-04c490f69beb’)
[ERROR:2020-03-24 19:49:56,568] rhasspyserver_hermes: Command ‘[‘bash’, ‘/home/vandaag/rhasspy-voltron/rhasspy-asr-kaldi/rhasspyasr_kaldi/kaldi/egs/wsj/s5/utils/prepare_lang.sh’, ‘/home/vandaag/.config/rhasspy/profiles/nl/kaldi/model/data/local/dict’, ‘’, ‘/home/vandaag/.config/rhasspy/profiles/nl/kaldi/model/data/local/lang’, ‘/home/vandaag/.config/rhasspy/profiles/nl/kaldi/model/data/lang’]’ returned non-zero exit status 127.
Traceback (most recent call last):
File “/home/vandaag/rhasspy-voltron/.venv/lib/python3.7/site-packages/quart/app.py”, line 1471, in full_dispatch_request
result = await self.dispatch_request(request_context)
File “/home/vandaag/rhasspy-voltron/.venv/lib/python3.7/site-packages/quart/app.py”, line 1519, in dispatch_request
return await handler(**request_.view_args)
File “/home/vandaag/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/main.py”, line 1145, in api_train
result = await core.train()
File “/home/vandaag/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/init.py”, line 387, in train
raise TrainingFailedException(reason=asr_response.error)

Again any suggestions?

First of all, thanks @synesthesiam for your great work !
I’ve tried the 2.5 prerelease and have the same problem as Jorg_Baumann above in a master/satellite configuration, and trying to use precise wakeword.

When I set an external MQTT broker, i have the following error on restart :

[ERROR:2020-03-24 22:18:47,754] rhasspyserver_hermes:
Traceback (most recent call last):
  File "/usr/lib/rhasspy-voltron/.venv/lib/python3.6/site-packages/quart/app.py", line 1471, in full_dispatch_request
    result = await self.dispatch_request(request_context)
  File "/usr/lib/rhasspy-voltron/.venv/lib/python3.6/site-packages/quart/app.py", line 1519, in dispatch_request
    return await handler(**request_.view_args)
  File "/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/__main__.py", line 758, in api_listen_for_command
    handle_captured(), messages, message_types
  File "/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/__init__.py", line 842, in publish_wait
    _, result = await asyncio.wait_for(result_awaitable, timeout_seconds)
  File "/usr/lib/python3.6/asyncio/tasks.py", line 362, in wait_for
    raise futures.TimeoutError()
concurrent.futures._base.TimeoutError
[DEBUG:2020-03-24 22:18:17,747] rhasspyserver_hermes: Publishing 140 bytes(s) to hermes/asr/startListening
[DEBUG:2020-03-24 22:18:17,735] rhasspyserver_hermes: -> AsrStartListening(siteId='Salon', sessionId='260266c6-5ecf-4e90-8185-8bd194099242', stopOnSilence=True, sendAudioCaptured=True, wakewordId='')
[DEBUG:2020-03-24 22:18:17,732] rhasspyserver_hermes: Subscribed to hermes/error/asr
[DEBUG:2020-03-24 22:18:17,728] rhasspyserver_hermes: Subscribed to hermes/asr/textCaptured
[DEBUG:2020-03-24 22:18:17,725] rhasspyserver_hermes: Waiting for transcription (sessionId=260266c6-5ecf-4e90-8185-8bd194099242)
[DEBUG:2020-03-24 22:18:06,991] rhasspyprofile.download: intent.system flair hermes = False
[DEBUG:2020-03-24 22:18:06,990] rhasspyprofile.download: speech_to_text.kaldi.open_transcription True False = False
[DEBUG:2020-03-24 22:18:06,988] rhasspyprofile.download: speech_to_text.kaldi.mix_weight >0 0 = False
[DEBUG:2020-03-24 22:18:06,987] rhasspyprofile.download: speech_to_text.pocketsphinx.mix_weight >0 0 = False
[DEBUG:2020-03-24 22:18:06,985] rhasspyprofile.download: speech_to_text.pocketsphinx.open_transcription True False = False
[DEBUG:2020-03-24 22:18:06,982] rhasspyprofile.download: speech_to_text.system kaldi hermes = False
[DEBUG:2020-03-24 22:18:06,980] rhasspyprofile.download: speech_to_text.system pocketsphinx hermes = False  

Here my profile :

"mqtt": {
        "enabled": "true",
        "host": "x.x.x.x",
        "port": "1883",
        "site_id": "xxx"
},

Any ideas ?
Thanks a lot !

Hi everyone!

Any hint on my audio issue ? Sound seems work fine from the CLI I’ve tried every option for aplay with the profile.json, still no sound and no error others than the one I’ve found, could it be related to trying to install it on a Pi A+ ?

Hope you’re all well on these troubled times.

@synesthesiam Any plans to release a rhasspy-satellite Docker image for Pi Zeros?