Rhasspy 2.5 docker : where is ${RHASSPY_BASE_DIR}?

Hi,

I created a new installation of rhasspy 2.5 on a PI3B+ with buster lite and docker installation mode.

I would like to know how to identify the directory associated to ${RHASSPY_BASE_DIR}
And how to found it myself (may be docker commands) ?

My goal is to put the

WAV files to play when Rhasspy wakes up and is finished recording a voice command

in the right place.

Thanks

You can try this:


Never tried it

Thks,

I did it but no /etc/wav
no /usr/lib/rhasspy-voltron

pi@raspberrypi:~ $ docker exec -it rhasspy /bin/bash
root@xxxxxxxxxx:/# ls -a
. … .dockerenv bin boot dev etc home lib media mnt opt proc profiles root run sbin srv sys tmp usr var
root@5b51afe7ec14:/# pwd
/

So ${RHASSPY_BASE_DIR} = “/” in my case right ?
And I have just to download these wav from github to the directory in settings or another if I modify it ?

Where this variable is set ?

Hi @raqpub I think it’s better to put custom wav files in your profile directory and then in settings (in Sound section) use this:

${RHASSPY_PROFILE_DIR}/1.wav

It works for me

2 Likes

I also want to upload some new wav files from my local win 10
can you please add a step by step explanation?

Hi @frkos,

Not for me. Thats why I want to know where this variable is setted.

So I launch a find command in bash docker rasspy … and finally found the beep*.wav

root@xxxxxxxxx:/# find . -name “beep*.wav” -print
./usr/lib/rhasspy/share/rhasspy/wav/beep_hi.wav
./usr/lib/rhasspy/share/rhasspy/wav/beep_error.wav
./usr/lib/rhasspy/share/rhasspy/wav/beep_lo.wav

but the settings in sounds with these path are also KO :sob::

${RHASSPY_BASE_DIR}/usr/lib/rhasspy/share/rhasspy/wav/beep_hi.wav

I messed up some paths in the Docker image regarding those WAV files. They should be in /usr/lib/rhasspy/share/rhasspy/etc/wav inside the image (once the fix is pushed).

I would take @frkos’s advice, though, and store them in your profile while using $RHASSPY_PROFILE_DIR instead.

1 Like

To sum up :
With 2.5pre I put the wav files under /usr/lib/rhasspy/share/rhasspy/etc/wav

pi@raspberrypi:~ $ docker exec -it rhasspy /bin/bash
root@b5f7f57056e5:/# cd /usr/lib/rhasspy/share/rhasspy/etc/wav
root@b5f7f57056e5:/usr/lib/rhasspy/share/rhasspy/etc/wav# ls
beep_error.wav beep_hi.wav beep_lo.wav

And now with defaults sounds settings :

Wake WAV ${RHASSPY_BASE_DIR}/etc/wav/beep_hi.wav
Recorded WAV ${RHASSPY_BASE_DIR}/etc/wav/beep_lo.wav
Error WAV ${RHASSPY_BASE_DIR}/etc/wav/beep_error.wav

It’s OK.

Thanks

How can i copy the wav files from from local system to the container?

Hi,
Since I recreated a buster + 2.5 and its ok in 2.5.

If I remember well on 2.5pre :
ssh on your rhasspy

docker exec -it rhasspy /bin/bash
cd /usr/lib/rhasspy/share/rhasspy/etc
#mkdir wav if not exist
cd wav
cp /usr/lib/rhasspy/share/rhasspy/wav/beep*  .
ls -altr # you will see all your beep files
exit #to leave bash docker

I’m not on pre.
wav dir is alresdy there with 3 files.
I tried cp, with no luck.
I can’t see in your code where you define the source?

Its not necessary to do these commands on 2.5. They deliver the beep files in the good directory.

So the sounds param in interface are ok in 2.5.
For example for Wake WAV ${RHASSPY_BASE_DIR}/etc/wav/beep_hi.wav

Sorry, i didn’t understand.
I want to replace the default wav files with different ones.
I uploaded the new sounds to /home/pi/Music/*.wav
but now i need to copy them to the container - which i don’t know how?..

OK. I’m not an expert of docker but I found on the net and tried this :

pi@raspberrypi:~ $ touch toto
pi@raspberrypi:~ $ docker cp toto rhasspy:/toto
pi@raspberrypi:~ $ docker exec -it rhasspy /bin/bash
root@ad319a594abb:/# ls
bin dev home media opt profiles run srv tmp usr
boot etc lib mnt proc root sbin sys toto var
root@ad319a594abb:/# exit
exit
pi@raspberrypi:~ $

Do not copy the WAV files in the container.

Just put the WAV files in your local profile folder (this folder is the one mounted in the container when you execute the docker run command) as suggested by @frkos and @synesthesiam (in a wav folder for instance).

Then modify your profile.json (manually or using the web ui) to point to the correct files using ${RHASSPY_PROFILE_DIR} as your profile folder path inside the docker container (so ${RHASSPY_PROFILE_DIR}/wav/beep.wav).

Hope this helps.

3 Likes