Rhasspy Pi zero

How do I install this? I tied commenting out the lines that install openfst in the “sreate.venv” script and just extracting the armv6l file into the .venv folder myself but the venv will not run. I get the error: “ModuleNotFoundError: No module named ‘pywrapfst’”

Near the end of the create-venv.sh script is the special handling for pywrapfst:

# Install Python openfst wrapper
"${PYTHON}" -m pip install \
            --global-option=build_ext \
            --global-option="-I${venv}/include" \
            --global-option="-L${venv}/lib" \
            -r <(grep '^openfst' "${this_dir}/requirements.txt")

It needs access to the OpenFST include (-I) and lib (-L) directories to install properly.

What do you plan to do on your Pi Zero? If you’re just going to do speech/intent recognition on a remote server anyways, there might be an easier way.

I followed what @KiboOst described above.

BlockquoteSo I tried with venv:

git clone https://github.com/synesthesiam/rhasspy.git
-> ok
cd rhasspy/
modify the ./download-dependencies.sh file and turn the “install Kaldi” option to false

modify the create-env file and change line 276 to include “|arm6l” in the architectures supported

When I ran create-env it gave me a few warnings and said it had irrecoverable errors but I ran the
./run-venv.sh --profile en command it still ran.

I had the same errors, so renamed rhasspy/public folder to rhasspy/dist
then in the rhasspy folder ran
tar -xvfs rhasspy/download/rhasspy-web-dist.tar.gz

After that it worked for me.

I still have a couple of issues. I haven’t tried setting it up as a service yet
and if I tell it to restart from the web interface (like after changing settings) it crashes and I need to restart it from the command line.

I have also tested the intent recogintion etc and seems to work but I haven’t configured the respeaker hat yet so don’t have a microphone to test voice.

btw, to be clear I have the PI Zero setup just to do wake word then pass everything else to a server for speech to text/intent, etc

That is what I’m planning to do as well. I’ll try following your instructions and see how it goes.

One step I didn’t mention but may be relevant.
I already had the setup I wanted on a Raspberry Pi 3b+ and originally cloned its SD Card.
I then needed to reinstall Rhasspy because of the change from arm7 to arm6 but I did copy the profile.json file from the working installation, so when I started it the “defaults” were for client-server rather than the normal defaults to handle things locally.

Hi @synesthesiam, when you say there may be an easier way, what did you have in mind?

There are two methods for voice output:
1.) sending text to satelite and use tts there
2.) using tts on server and sending wav to satelite

which is better?
I actually use first method. I watched “top” during the output and there was no significant change on the satelite.

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 :slight_smile:

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] POST /api/text-to-intent 1.1 200 196 97904
Mar 13 15:45:05 rhasspy0 rhasspy[130]: INFO:quart.serving: 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 :slight_smile: It could be interesting on other devices too.

1 Like

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?