Skip to content
Hugh Barnard edited this page Jan 12, 2023 · 38 revisions

Welcome to the mema3 wiki!

Build Your Own Mema3

This probably won't completely 'work', straight out of the box, but I'll keep it updated. It will need an Ubuntu system with camera, microphone and speakers. Probably a USB webcam + microphone will work for some of it.

First git clone https://github.com/hbarnard/mema.git

Next Docker Installs for Rhasspy, Mimic3 and Node-Red. We are using the host network rather than container network. This means that all the component connections can be configured as localhost and, in principle, everything except external AI will work without any network present. Also, the names are now mema_<something> for docker ps -a convenience etc. etc.

There is, in fact, an install script at ./install.sh but it will not configure Rhasspy at the moment, this depends on the configuration of the computer (microphone, speakers etc.).

Rhasspy

docker run -d --network host --name mema_rhasspy --restart unless-stopped -v "$HOME/.config/rhasspy/profiles:/profiles" -v "/etc/localtime:/etc/localtime:ro" --device /dev/snd:/dev/snd rhasspy/rhasspy --user-profiles /profiles --profile en

Mimic3

This is the 'better' text to speech rather than, for example, espeak. It must be configured in Rhasspy as MaryTTS, a cheat, external http.

sudo docker run --network host -d --restart unless-stopped --name mema_mimic3 -v "${HOME}/.local/share/mycroft/mimic3:/home/mimic3/.local/share/mycroft/mimic3" 'mycroftai/mimic3'

Now works on the laptop, speech api is at http://localhost:59125/process some confusion in the documentation about this.

Probably need sudo chmod a+rwx "${HOME}/.local/share/mycroft/mimic3" too. To be investigated.

Node-Red

Docker install is broken on Raspberry Pi Zero (apparently) but should be OK elsewhere:

docker run -d --network host -v node_red_data:/data --restart unless-stopped --name mema_nodered nodered/node-red

General Docker note: You only want -it if debugging otherwise -d. `

Mosquitto

apt install mosquitto mosquitto-dev

Started to use an external instance of this, rather than the one in Rhasspy. Gives more flexbility and also offloads some tasks from the centre. Also can examine and tune messages. Bit more complexity though.

Python3 and Libraries

The modules are now in requirements.txt in the main directory: pip install -r requirements.txt

Packages

Some confusion here because Ubuntu is beginning to use snap rather than apt. However most of them are listed in `install.sh`. Also, the current web page launcher is https://github.com/isamert/jaro because xdg-open tends to be flaky on Pi at least. This requires guile (any version) and ./config/associations

Miscellaneous

Use
sudo visudo
and add
 ALL=(ALL) NOPASSWD: ALL
, since docker images run as root but we want
intent_server.service
the rest of the application to run as the user (usually pi), so, for example `jaro` opens the display as the 'user'. Let's see whether that's a problem for the Pi, too

The screen blanking on the Pi can be turned off via raspi-config rather than xset (or maybe it callxs xset?)

Clone this wiki locally