Add new profile

I use Docker with Raspberry pi, by default I have a profile in English, but I would like to know how to add another in English. There are no specific steps for that (or at least I don’t see them in the documentation).

Another question, is it possible to have a language and change it easily with some command?


Start docker with --profile

For example:

docker run -d -p 12101:12101
–name rhasspyNL
–restart unless-stopped
-v “$HOME/.config/rhasspy/profiles:/profiles”
-v “/etc/localtime:/etc/localtime:ro”
–device /dev/snd:/dev/snd
–user-profiles /profiles
–profile nl

I have also changed the name tag to rhasspyNL, so that you can switch fast with:

docker stop rhasspy
docker start rhasspyNL

Documentation can be found here

1 Like

Steps from scratch are (correct me if I’m wrong):

  1. I create a new profile with:
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 en
  1. I deactivate my current docker with:
docker stop rhasspy
  1. I create a new docker with a new name and profile
docker run -d -p 12101:12101 \
  --name rhasspy-es \
  --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 es
  1. If I want to activate the other profile I run:
docker stop rhasspy-en
docker start rhasspy

I am right?

Should be rhasspy-es (you have no rhasspy-en in your commands), but other than that you are correct.

If you notice, the first one isn’t called rhasspy-en, it’s just called rhasspy. The second is called rhasspy-es.

What command should I use?
docker stop + the name (docker stop rhasspy)
docker stop + the profile (docker stop rhasspy-en)

depends on which docker you want to stop :wink:

If you want to use the en profile, you must stop rhasspy-es and start rhasspy
If you want to use the es profile, you must stop rhasspy and start rhasspy-es

Maybe, for clarity, you should rename rhasspy to rhasspy-en :slight_smile:

So you start/stop the dockers with their names, not profiles. It is the --name which is important.
You could also call it rhasspy-profile1 and rhasspy-profile2 for that matter.
The --profile is the argument which defines the profile (aka language)

When I run the code twice I get a port taken error, my question is: is it really necessary to install it again to have two profiles with two languages? That is, isn’t there a simple way to have two folders in / profiles?

You can only have 1 docker running at a time.

Yes, rhasspy has only 1 active language. So if you want to switch, you need to stop language1 and start language2 and vice versa.
There are two folders in profiles, rhasspy creates them with the --profile setting.

1 Like

Yes, the conflict is over the port number. Just change one of your docker run commands from -p 12101:12101 to something like -p 13101:12101 instead. Then the second language will be available at http://localhost:13101

1 Like

Thank you.

But can two be on at the same time (multiple languages) or just turn one on and off the other?

I have another question regarding DeepSpeech, is it easy to update it to the latest version? I don’t know how to measure time in rhasspy, but, I have the latest version of standalone deepspeech and it takes a short time to recognize the voice, I don’t know why, but I get the feeling that in rhasspy it is slower, I think it is because it has DeepSpeech version 0.6.

1 Like

One on and the other off. You could have them both running with different wake words, but Rhasspy does not classify audio by language and then dispatch it appropriately. Maybe some day in the future :slight_smile:

Yes, we’ve stuck with 0.6 because that had the best model support for different languages at the time (English and German). If you’ve read the Master Plan, I’m now training my own Kaldi models and may do DeepSpeech in time.

If you happen to be interested in Spanish, I just published a Spanish Kaldi profile this morning. It will be rolled into the 2.5.8 release of Rhasspy, hopefully with a new Spanish text to speech voice as well.

1 Like

So far I have only used DeepSpeech, I suppose it is the best for being from a large company. Or am I wrong? Is Kaldi better?

I’ve found Kaldi’s performance (accuracy and speed) to be excellent. If you want to use Rhasspy to recognize specific voice commands rather than do general speech to text, I think Kaldi is the way to go.

DeepSpeech works better with general unconstrained speech to text, but I don’t think this is because its approach is any better than Kaldi’s. I think Mozilla is just pushing a lot more data into the models, so they perform better. My Kaldi models are also smaller so they can run quickly on Raspberry Pi’s with low amounts of memory.