Dies ist eine alte Version des Dokuments!
Inhaltsverzeichnis
Rhasspy 2.5.11 statt Snips
Nachdem Snips von Sonys gekauft wurde und die Entwicklung geschlossen wurde, läuft mein System seit langem unter raspbian. Inzwischen sind wir aber Generationen weiter und eigentlich sollte man seine Betriebssystem aktuell halten. Also der Versuch, umzusteigen.
Rhasspy __Bullseye__ 64bit Stand 12/2022
ibgfortran4 muss man durch libgfortran5 ersetzen; statt onnxruntime-1.6.0 muss man onnxruntime-1.9.1-cp39-cp39-linux_armv7l.whl nehmen; sudo apt-get install libffi6; von phonetisaurus-0.3.0-py3-none-linux_aarch64.whl gibt es die version auf der seite https://github.com/rhasspy/phonetisaurus-pypi/releases;
weiter bin ich nicht gekommen, war mir zu kompliziert und in der Tabelle, was danach alles geht oder nicht, war mir das zu wenig
Rhasspy __Buster__ 32bit Stand 12/2022
von Sourcen
nachdem der Installer weder onnxruntime, noch phonetisaurus gefunden hatte, und auch ein fehlendes libcst (Rust?) anmalte, dies runtergeladen bzw. in das Makefile.in integriert (siehe Bullseye 32bit). Nach dem Start dann noch ein markupsafe Import error „ImportError: cannot import name 'soft_unicode' from 'markupsafe'“. Beheben mit pip install markupsafe==2.0.1
mit Docker
ging eigentlich recht problemlos.
docker run -d -p 12101:12101 \ --name 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 de profile in /home/pi/.config/rhasspy
docker install von node-red macht probleme. https://www.reddit.com/r/nodered/comments/w73sja/error_after_30_update/; Lösung: docker run –security-opt=seccomp=unconfined -it -p 1880:1880 nodered/node-red
Nur wollte ich gerne 'Hey Snips' als WakeWord. Da muss man aber so viel in den Sourcen ändern und das noch im Docker, das habe ich mir dann nicht zugetraut. Daher das Ganze doch über die Sourcen installieren.
Rhasspy __Bullseye__ 32bit Stand 12/2022
rhasspy auf bullseye 32bit sudo apt-get update; sudo apt-get dist-upgrade -y; sudo reboot now # wegen kernel-hacks sudo apt-get install \ python3 python3-dev python3-setuptools python3-pip python3-venv \ git build-essential libatlas-base-dev swig portaudio19-dev \ supervisor mosquitto sox alsa-utils libgfortran4 libopenblas-dev \ espeak flite \ perl curl patchelf ca-certificates -y nano .profile ------------- alias activate='. $HOME/rhasspy/.venv/bin/activate' . .profile git clone --recursive https://github.com/rhasspy/rhasspy cd rhasspy/ nano ./rhasspy-tts-larynx-hermes/requirements.txt ------------------------------------------------- larynx~=0.5.0 nano Makefile.in ---------------- unter Dependecies: ONNRXRUNTIME_WHL_FILE = $(DOWNLOAD_DIR)/armv7/onnxruntime-1.7.2-cp39-cp39-linux_armv7l.whl nach install-init: "$(VENV_PYTHON)" -m pip install $(PIP_INSTALL_ARGS) libcst==0.3.23 "$(VENV_PYTHON)" -m pip install $(PIP_INSTALL_ARGS) pip install markupsafe==2.0.1 # https://github.com/aws/aws-sam-cli/issues/3661 $(DO_DOWNLOAD) "$(ONNRXRUNTIME_WHL_FILE)" "https://github.com/synesthesiam/prebuilt-apps/releases/download/v1.0/onnxruntime-1.6.0-cp37-cp37m-linux_armv7l.whl" "$(VENV_PYTHON)" -m pip install $(PIP_INSTALL_ARGS) $(ONNRXRUNTIME_WHL_FILE) auskommentieren: (https://github.com/rhasspy/rhasspy/issues/46) #cp -fR "${srcdir}/rhasspy-server-hermes/web/docs" "$(DESTDIR)$(prefix)/share/rhasspy/" || true # das hat irgendwie nichts bewirkt, obwohl es dorthin gehört #unter .PHONY: larynx #ifeq ($(ENABLE_LARYNX),yes) #larynx: #ifeq ($(LARYNX_ARCH),armv7) #install-larynx: $(PHONETISAURUS_WHEEL) $(ONNXRUNTIME_WHEEL) $(ONNRXRUNTIME_WHL_FILE) #else # LARYNX_ARCH == armv7 #install-larynx: $(PHONETISAURUS_WHEEL) $(ONNRXRUNTIME_WHL_FILE) #endif # LARYNX_ARCH == armv7 #$(ONNRXRUNTIME_WHL_FILE): # $(DO_DOWNLOAD) "$(ONNRXRUNTIME_WHL_FILE)" #"https://github.com/nknytk/built-onnxruntime-for-raspberrypi-linux/blob/master/wheels/buster/onnxruntime-1.7.2-cp39-cp39-linux_armv7l.whl" ./configure RHASSPY_LANGUAGE=de --enable-in-place make make install ##(wohl nur bei 64bit, bei 32bit geht es ohne probleme) libgfortran4 durch libgfortran5 ersetzen! ##There is onnxruntime-1.9.1-cp39-cp39-linux_armv7l.whl ##larynx~=1.1.0 ##sudo apt-get install libffi6 ##was macht: sudo apt-get -f install ? chmod +x rhasspy.sh ./rhasspy.sh --profile=de Vom Mac aus geht die Web-Oberfläche nicht - also Chrome genommen. http://192.168.178.58:12101/
Achtung: Dokumentation geht nicht, und der Tipp aus dem Internet, im makefile was auszukommentieren hat auch nicht geholfen. Also einfach nicht drauf klicken.
Sound und Mikrofon
lsusb: Bus 001 Device 005: ID 0d8c:0170 C-Media Electronics, Inc. Fujitsu UC&C USB Value Headset aplay -l: card 0: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones] card 2: Headset [Fujitsu UC&C USB Value Headset], device 0: USB Audio [USB Audio] Subdevices: 1/1 Subdevice #0: subdevice #0 alsamixer: Lautstärke auf 2/3; Capture auf 1/3 sudo alsactl store
Porcupine und 'Hey Snips'
Die Firma hat eine neuere Version als in Rhasspy integriert. Damit auch ein anderes WakeWord Format und zusätzlich braucht man noch einen access key. Das selber generierte WakeWord funktioniert dann auch nur 1-3 Monate!? und man muss es wieder erzeugen lassen und runterladen - was ein Mist!
In diesem Blog wird beschrieben, was genau zu ändern ist. Später kommt dann noch ein diff-file, das aber andere Pfade hat, als bei mir. Folgende Dateien sind zu ändern:
nano rhasspy-profile/rhasspyprofile/profiles/defaults.json nano rhasspy-supervisor/rhasspysupervisor/__init__.py nano rhasspy-wake-porcupine-hermes/rhasspywake_porcupine_hermes/__init__.py nano rhasspy-wake-porcupine-hermes/rhasspywake_porcupine_hermes/__main__.py pip3 install pvporcupine==2.1.0 nano /home/pi/.config/rhasspy/profiles/de/profile.json
Datei unter /home/pi/.config/rhasspy/profiles/de/porcupine heisst: „hey-snips.ppn“ in Datei nano /home/pi/rhasspy/rhasspy-wake-porcupine-hermes/rhasspywake_porcupine_hermes/init.py
wenn irgend ein Aufruf im Create nicht geht, kommt ein VALUE ERROR oder ein MEMORY ERROR.
"wake": { "porcupine": { "access_key": "MQUIJaKq/B/7mNOPpNCiAvDFWAh+Jf9tnUQnUPCMwyYZHcmH6lBcAg==", "keyword_path": "/home/pi/.config/rhasspy/profiles/de/porcupine/hey-snips.ppn", "keywords": ["hey snips"] }, "system": "porcupine" }