brailcom/speechd

Cannot configure Mimic3 with speech-dispatcher

Closed this issue · 10 comments

I am trying to configure Mimic3 speech synthesizer to use it with speech-dispatcher, but it seems like it doesn't recognize voices I downloaded/installed and lists Mary TTS voices.

Steps to reproduce

  1. compile Mimic3 from source with install.sh script provided.
  2. Edit the file /etc/speech-dispatcher/modules/mimic3-generic.conf and and change the path to venv where all mimic3 Python packages were installed after running install.sh script.
    In my case the whole string looks like:
    GenericExecuteSynth
    "printf %s '$DATA' | /home/seva/Apps/mimic3/.venv/bin/mimic3 --remote --voice '$VOICE' --stdout | $PLAY_COMMAND"
  3. Download voices you'd like to use. In my case I launched provided venv and downloaded Russian, English US, English UK and Polish voices:
    mimic3-download ru_RU
    mimic3-download en_US
    mimic3-download en_UK
    mimic3-download pl_PL
  4. Run mimic3 server with mimic3-server command.
  5. Restart Orca that speech-dispatcher also restarts after 10 seconds of waiting.
  6. Open Orca preferences. You will find on voices tab that there is Mary TTS synthesizer listed, but there are no mimic3 languages or voices downloaded before.
  7. Try to activate one of voices and there will be silence.

Obtained behavior

I believe that mimic3 voices and languages that were downloaded should be listed, but there are Mary TTS voices, as far as I understand that, there is no Russian and Polish language in the list and I cannot use downloaded voices. Plus voices that are presented in the list are all silent.

Expected behavior

I can choose voices I have just downloaded and use them with Orca.

Distribution

Arch Linux.

Version of Speech-dispatcher

0.11.4.

Logs

mary-generic.log
speech-dispatcher.log
mimic3-generic.conf
speechd.conf

As mentioned in https://github.com/brailcom/speechd/blob/master/config/modules/mimic3-generic.conf the mimic3 module cannot automatically detect voices, so that has to be configured manually in mimic3-generic.conf with AddVoice lines. Possibly the existing examples there are outdated, and contributing a fix will be welcome.

Actually, one of the Russian voices, for example, is added in mimic3-generic.conf files already, this is the voice I want to test.
With this line:
AddVoice "ru" "FEMALE1" "ru_RU/multi_low"
Inspite of that the voice is downloaded with "mimic3-download ru_RU/multi_low" command and it is added in the configuration file, it is still not listed in Orca's settings.
I also tried to install voices mentioned in this list with mimic3-download command in a virtual environment provided by the install script:
AddVoice "en" "MALE1" "en_UK/apope_low"
with:
mimic3-download en_UK/apope_low

Does

spd-say -o mimic3-generic -L

report something? On my system it does report the list of voices configured in mimic3-generic.conf

(btw you attached mary-generic.log but it's mimic3-generic.log that we need to know what happened with the mimic3 module :) )

Does

spd-say -o mimic3-generic -L

report something? On my system it does report the list of voices configured in mimic3-generic.conf

In my case it reports the list of voices for eespeak-ng.

Here is the information that might help in debugging:

  1. I am running Arch on a Virtual Box virtual machine.
  2. When running a mimic3-server there is a message:
    info: hypercorn.error:running on 0.0.0.0:59125.
  3. I installed all packages using Python 3.11 first, but then I remembered that they should be installed on python3.7. I removed venv and installed packages again with the needed version of Python by changing Python command used in install.sh mimic3's script but it also didn't help, error is still displayed.

(btw you attached mary-generic.log but it's mimic3-generic.log that we need to know what happened with the mimic3 module :) )

I set debug to 1 in mimic3-generic.conf but unfortunately mimic3-generic.log is never created in /run/user/1000/speech-dispatcher/log.

unfortunately mimic3-generic.log is never created in /run/user/1000/speech-dispatcher/log.

So that means that the mimic3 module is not actually getting run. I was about to ask for the spd-say -O output, but it'd probably just show that mimic3 is not there.

It happens that speech-dispatcher.log says:

[Fri Jun  2 17:41:48 2023 : 805214] speechd:     Did not find command mimic3
[Fri Jun  2 17:41:48 2023 : 805231] speechd:     Ignoring /etc/speech-dispatcher/modules/mimic3-generic.conf: did not find 1 dependency

The mimic3-generic module needs the mimic3 command to be available, since that's what it runs. You can also fix the path to mimic3 in mimic3-generic.conf in the GenericCmdDependency line, or just comment it.

Thank you, commenting the generic cmd line helped! Now mimic3 is displayed in speech-dispatcher and works! I think it would be better to comment this line in the default configuration if possible in case users want to compile the TTS from source and we already show the path to mimic3 binary in generic execute synth. Commenting the line could make the process less confusing. Or this line is still needed? The reason I compiled mimic3 from source is that it isn't available in Arch repositories neither officially, nor in AUR. Thank you again for your help!

I think it would be better to comment this line in the default configuration if possible

No, we do not want this, since that'd make it always shown. That's the only way we can know whether to show it or not.