Install second language in install

I am installing Rhasspy following the “from scratch on a raspberry pi” tutorial
After pulling the Rhasspy image from docker can I install it with a second profile language?
Like adding a second command after --profile en

Hi @Jeinzo, welcome :slight_smile:

Rhasspy only works with one language at a time, but you can run two Docker containers with different profiles. If you want them to share a microphone, you will have to use something like gstreamer to push audio into each container separately.

Setting a different wake word for each container should (in theory) allow you to have Rhasspy running with different languages.

1 Like

Sounds like a lot of trouble to get it running with two languages,but anyway
Currently I am using Rhasspy for my diploma thesis so thank you for the answer and also for providing such a great open-source tool.

2 Likes

Hi @Jeinzo,
that sounds very interesting. What is your diploma thesis about? :slight_smile:

About using Rhasspy as an open source voice assistant,using sonoff sensors etc.
Pretty much what rhasspy does and explaining the way and how it all comunicates and connects,also making it more costumable than Alexa,echo dot etc

1 Like

Hey @Jeinzo, that sounds very interesting. Are you writing your thesis in English or some other language? It would be very cool, if you could publish it, so we can read it :slight_smile:

1 Like

Thank you for your interest.
I am writing my thesis only in greek unfortunately

Ok, that might be a bit difficult for most of us, but if it has informative pictures, I would take a look :smiley:

Hi @synesthesiam

I’m interested in this approach. I’ve managed to start two containers with DE and FR profiles by specifying these port forwarders
-p 12101:12101 (for DE)
and
-p 12102:12101 (for FR)
Using the gstreamer setup as defined in the docs does not work for me, though. I guess the setup is only meant to listen on a port rather than the mic. How would you define the gstreamer setup to share the mic between the two containers?

thanks for any hint :slight_smile:

@kusi I’ve created a tutorial detailing how it all works: https://rhasspy.readthedocs.io/en/latest/tutorials/#multiple-instances-of-rhasspy

Let me know if it works for you (and especially if it doesn’t) :slight_smile:

2 Likes

Hi @synesthesiam, thanks alot for the detailed write-up, fantastic! I finally gave it a shot, but didn’t succeed yet. I’m using docker-compose to start one rhasspy and one node-red container (and some other stuff), but I believe this shouldn’t change much. I struggle with the gstreamer part. I first have to resolve that before trying a 2nd rhasspy container in an alternative language. My wake word is not detected.

I don’t have gstreamer installed in the host os, but it is installed in your rhasspy container. So I start what you call “the final piece of the puzzle” within the container shell and get

root@f1670f14d106:/# gst-launch-1.0     autoaudiosrc !     audioconvert !     audioresample !     audio/x-raw, rate=16000, channels=1, format=S16LE !     multiudpsink clients=127.0.0.1:11111
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
WARNING: from element /GstPipeline:pipeline0/GstAutoAudioSrc:autoaudiosrc0: Jack server not found
Additional debug info:
gstjackaudiosrc.c(365): gst_jack_ring_buffer_open_device (): /GstJackAudioSrc:autoaudiosrc0-actual-src-jackaudi:
Cannot connect to the Jack server (status 17)
Setting pipeline to PLAYING ...
New clock: GstSystemClock

Two questions:

  • Is it allowed to run gst-launch within the container shell or does it need to be run on the host?
  • The warning of not being able to connect to the Jack server is irrelevant, right?

Thanks alot for your help, great work!

On the host, that is also what it says in the tutorial. It uses the mike on the host to stream audio to both docker containers.
The warning is because you do not have the hardware in the container.

I thought that the parameter

--device /dev/snd:/dev/snd

takes care of transporting audio in/out between container/host and that gst-launch just acts as a multiplexer. But indeed, installing everything on the host works (so far just for one language container, not for the 2nd, need to check for errors on my setup)

However, gst-launch now takes constantly 100% of my CPU. Pure Porcupine takes like 5%. Seems like there is indeed a JACK server lauched by gst-launch, which is very ressource hungry in order to ensure low latency. Low latency is not a requirement for Rhasspy, maybe there are other solutions?