I set up marytts on the server and have the satellite configured to use it, so I would be using the second method. I want to be able to have the same method working for clients running on pi zeros, raspberry pi 3s and possibly a couple of other platforms so I want the client to have as small a footprint as possible.
That way all the actual work is on having the server and services setup once. The rest just talks to it.
For Rhasspy 2.5, I’ve set up the rhasspy-satellite project to make the virtual environment install easy. It should be as simple as a git clone --recursive ...
and then a make
This project doesn’t include any ASR system, so it can’t do speech to text locally. But that also means it doesn’t depend on any pre-compiled binaries! If you’re willing to be a beta tester, you might give it a try
This should also be compatible with Rhasspy 2.4’s HTTP API, meaning you can leave your master server alone until the full 2.5 is more solid.
Cool! Will there be a Docker image too for this?
I’ll give it a go and let you know
One piece of feedback, the reason that I was trying the .venv installation method is that Docker has a memory and resource overhead which was OK on the Raspberry Pi 3 but would have blown the Pi Zero’s memory in my configuration and would probably leave it very close even if I tried to trim it back to bare.
So I wanted something running bare metal on the Pi
Hi, I got something built but when I test just through the web interface and select “Recognize” the satellite shows “No intent recognized”.
On the server running 2.4.19 I get
Mar 13 15:45:05 rhasspy0 rhasspy[130]: ERROR:FsticuffsRecognizer:in_loaded
Mar 13 15:45:05 rhasspy0 rhasspy[130]: Traceback (most recent call last):
Mar 13 15:45:05 rhasspy0 rhasspy[130]: File "/home/speech/rhasspy/rhasspy/intent.py", line 183, in in_loaded
Mar 13 15:45:05 rhasspy0 rhasspy[130]: assert recognitions, "No intent recognized"
Mar 13 15:45:05 rhasspy0 rhasspy[130]: AssertionError: No intent recognized
Mar 13 15:45:05 rhasspy0 rhasspy[130]: DEBUG:InboxActor: -> stopped
Mar 13 15:45:05 rhasspy0 rhasspy[130]: DEBUG:__main__:{"text": "whats the time", "intent": {"name": "", "confidence": 0}, "entities": [], "raw_text": "whats the time", "speech_confidence": 1, "slots": {}, "wakeI
d": "", "siteId": "speech", "time_sec": 0.0682382583618164}
Mar 13 15:45:05 rhasspy0 rhasspy[130]: DEBUG:HermesMqtt:Published intent to hermes/nlu/intentNotRecognized
Mar 13 15:45:05 rhasspy0 rhasspy[130]: DEBUG:InboxActor: -> stopped
Mar 13 15:45:05 rhasspy0 rhasspy[130]: [2020-03-13 15:45:05,481] 192.168.179.92:54030 POST /api/text-to-intent 1.1 200 196 97904
Mar 13 15:45:05 rhasspy0 rhasspy[130]: INFO:quart.serving:192.168.179.92:54030 POST /api/text-to-intent 1.1 200 196 97904
If I try from my 2.4.19 satellite it works fine.
I’m doing it from the web interface to minimize errors. Also I haven’t managed to get the Wake Word working but I’m not sure if that is a problem at my end. This is the first machine I have tried using the respeaker 2-mic hat with. I can record and play back with it if I hit the “Wake” button and then “Play Recording” on the Test page but it doesn’t seem to respond using pocketsphinx (yet)
Yes I know, I wasn’t talking about the Raspberry Pi Zero specifically, but about the rasspy-satellite project It could be interesting on other devices too.
Is it supposed to work in docker on Pi Zero? Tried running it with docker run command from Installation docs, and setting all up manually in Portainer, container shows as running but no exposed ports, no logs, no signs of life.
Or how should I approach this? Koan here mentions rasspy-satellite project, but google shows this page as the only reference to that name.
In ideal world I would imagine a setup where PiZero only does wake word detection, records audio and sends it to the central rhasspy server for further processing. Could also receive some info back like response maybe.
I haven’t tried rhasspy-satellite yet, but have you tried the installation instructions in the rhasspy-satellite repository?
If I find some time, I can try it this weekend on a Pi Zero W.
I will try, thanks. Weird that google could not find it by the search of “rhasspy-satellite”.
It does indeed work on a pi zero with Docker as a satellite with a central server on eg an Intel NUC. I have it running like that for weeks now, although not using Portainer.
I’m now thinking about moving over everything to Docker Swarm and let the pi zeros join the swarm. That way I can spin up the containers through a central interface, like Portainer.
I don’t find rhasspy-satellite on Docker Hub, nor do I find a Dockerfile in its repository. How did you build the container image?
I believe it is this one
So with the 2.5.0-pre-arm32v6
tag.
I tried virtual env install, but got this. Will try docker image now.
Cant’ find documention on parameters required for rhasspy\rhasspy though
Building wheels for collected packages: rapidfuzz
Building wheel for rapidfuzz (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /opt/rhasspy-satellite/.venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-1wsxn38m/rapidfuzz/setup.py'"'"'; __file__='"'"'/tmp/pip-install-1wsxn38m/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-d9ehhno2
cwd: /tmp/pip-install-1wsxn38m/rapidfuzz/
Complete output (31 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 src/rapidfuzz/fuzz.py -> build/lib.linux-armv6l-3.7/rapidfuzz
copying src/rapidfuzz/process.py -> build/lib.linux-armv6l-3.7/rapidfuzz
copying src/rapidfuzz/utils.py -> build/lib.linux-armv6l-3.7/rapidfuzz
copying src/rapidfuzz/__init__.py -> build/lib.linux-armv6l-3.7/rapidfuzz
running egg_info
writing src/rapidfuzz.egg-info/PKG-INFO
writing dependency_links to src/rapidfuzz.egg-info/dependency_links.txt
writing top-level names to src/rapidfuzz.egg-info/top_level.txt
reading manifest file 'src/rapidfuzz.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.hpp' under directory 'cpp/src'
warning: no files found matching '*.txx' under directory 'cpp/src'
warning: no files found matching '*' under directory 'cpp/extern/boost'
warning: no files found matching '*.hpp' under directory 'python/src'
writing manifest file 'src/rapidfuzz.egg-info/SOURCES.txt'
running build_ext
building 'rapidfuzz.levenshtein' extension
creating build/temp.linux-armv6l-3.7
creating build/temp.linux-armv6l-3.7/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 -Isrc/rapidfuzz-cpp/src -Isrc/rapidfuzz-cpp/extern -I/opt/rhasspy-satellite/.venv/include -I/usr/include/python3.7m -c src/py_levenshtein.cpp -o build/temp.linux-armv6l-3.7/src/py_levenshtein.o -O3 -std=c++14 -DVERSION_INFO="0.7.4"
src/py_levenshtein.cpp:7:10: fatal error: levenshtein.hpp: No such file or directory
#include "levenshtein.hpp"
^~~~~~~~~~~~~~~~~
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
Failed to build rapidfuzz
Installing collected packages: aiofiles, chardet, attrs, multidict, idna, yarl, async-timeout, aiohttp, marshmallow, typing-extensions, mypy-extensions, typing-inspect, stringcase, marshmallow-enum, dataclasses-json, json5, decorator, networkx, docopt, num2words, paho-mqtt, precise-runner, pydash, pyyaml, werkzeug, blinker, itsdangerous, hpack, hyperframe, h2, h11, toml, priority, wsproto, hypercorn, click, MarkupSafe, jinja2, quart, quart-cors, rapidfuzz, swagger-ui-py, webrtcvad, Markdown, six, tornado, livereload, mkdocs
Running setup.py install for rapidfuzz ... error
ERROR: Command errored out with exit status 1:
command: /opt/rhasspy-satellite/.venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-1wsxn38m/rapidfuzz/setup.py'"'"'; __file__='"'"'/tmp/pip-install-1wsxn38m/rapidfuzz/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-vq00bisw/install-record.txt --single-version-externally-managed --compile --install-headers /opt/rhasspy-satellite/.venv/include/site/python3.7/rapidfuzz
cwd: /tmp/pip-install-1wsxn38m/rapidfuzz/
Complete output (31 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-armv6l-3.7
creating build/lib.linux-armv6l-3.7/rapidfuzz
copying src/rapidfuzz/fuzz.py -> build/lib.linux-armv6l-3.7/rapidfuzz
copying src/rapidfuzz/process.py -> build/lib.linux-armv6l-3.7/rapidfuzz
copying src/rapidfuzz/utils.py -> build/lib.linux-armv6l-3.7/rapidfuzz
copying src/rapidfuzz/__init__.py -> build/lib.linux-armv6l-3.7/rapidfuzz
running egg_info
writing src/rapidfuzz.egg-info/PKG-INFO
writing dependency_links to src/rapidfuzz.egg-info/dependency_links.txt
writing top-level names to src/rapidfuzz.egg-info/top_level.txt
reading manifest file 'src/rapidfuzz.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.hpp' under directory 'cpp/src'
warning: no files found matching '*.txx' under directory 'cpp/src'
warning: no files found matching '*' under directory 'cpp/extern/boost'
warning: no files found matching '*.hpp' under directory 'python/src'
writing manifest file 'src/rapidfuzz.egg-info/SOURCES.txt'
running build_ext
building 'rapidfuzz.levenshtein' extension
creating build/temp.linux-armv6l-3.7
creating build/temp.linux-armv6l-3.7/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 -Isrc/rapidfuzz-cpp/src -Isrc/rapidfuzz-cpp/extern -I/opt/rhasspy-satellite/.venv/include -I/usr/include/python3.7m -c src/py_levenshtein.cpp -o build/temp.linux-armv6l-3.7/src/py_levenshtein.o -O3 -std=c++14 -DVERSION_INFO="0.7.4"
src/py_levenshtein.cpp:7:10: fatal error: levenshtein.hpp: No such file or directory
#include "levenshtein.hpp"
^~~~~~~~~~~~~~~~~
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /opt/rhasspy-satellite/.venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-1wsxn38m/rapidfuzz/setup.py'"'"'; __file__='"'"'/tmp/pip-install-1wsxn38m/rapidfuzz/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-vq00bisw/install-record.txt --single-version-externally-managed --compile --install-headers /opt/rhasspy-satellite/.venv/include/site/python3.7/rapidfuzz Check the logs for full command output.
Okay, this worked!
docker run -d -p 12101:12101 \
-v "/home/pi/.config/rhasspy/profiles:/profiles" \
--restart unless-stopped \
--name "rhasspy" \
--device /dev/snd:/dev/snd \
rhasspy/rhasspy:2.5.0-pre-arm32v6 \
--user-profiles "/profiles" \
--profile "ru"
Hi all,
I tested the rhasspy-satellite and it works well on pi 0 and 3 B+ only if i change rapidfuzzy to 0.7.7 in requirements.txt
I wrote a french blog article on it : https://www.coxprod.org/domotique/rhasspy-en-mode-satellite/
thanks to @synesthesiam @koan @fastjack @KiboOst , your work is usefull I can think now to switch from snips to rhasspy. And many others people too
Ced
This sounds like the version of rapidfuzz your using is something before 0.7.5, where some wrong files where I changed the directory structure but forgot to upate the Manifest file. it should be fixed in 0.7.5. The latest version on the master branch is using 0.7.8 could you try it with this version?
You should use 0.7.8 instead of 0.7.7, since it had a bug that affects the rhasspy fuzzywuzzy NLU aswell https://github.com/maxbachmann/rapidfuzz/issues/27
Thanks for this info
Ced
Gotcha. Well since I got it working with docker its preferred anyway, as its a lot quicker and easier to deploy, so the only reason for me to try running it in venv is if I decide to contribute something to the project, I guess. Thanks for the info anyway, I’m sure someone (maybe even myself in the future) will find it useful!
I have got my usual comment to make that without AEC playing any media is likely to create Forrest Rhasspy syndrome.
Say “Rhasspy play the news” and it will likely be a case of “RHASSPY I SAID BLOODY STOP!” as Forrest Rhasspy continues to play regardless.
If you are doing no media playback then a Pi-0 can work if you are doing media playback you need AEC and a $70 mic array on a $5 SoC just doesn’t make sense.
Just been trying the Zero with SpeexDsp-AEC and wow its much less load than I expected but on the Zero results are not great.
Strangely far better than I expected as didn’t expect it to work at all.
Its a shame as its very close to usable on a Zero! But that also means there is far more scope for software improvement on a Pi3/4
So not sure if the zero is all that a good idea but guess as long as you never play a continuous or long media stream you will be OK.
I am not sure about the Pi-zero so apols if no help but thought I would mention there if media is needed then its no to software EC and hardware EC is quite expensive.