MycroftAI / mimic3

A fast local neural text to speech engine for Mycroft
GNU Affero General Public License v3.0
1.08k stars 103 forks source link

mimic3 running in a container is not accessible to speech-dispatcher #60

Open flaurafauna opened 2 months ago

flaurafauna commented 2 months ago

Describe the bug Using speech-dispatcher with mimic3 running in a container does not work as there is no functional /path/to/mimic3 to reference in mimic3-generic.conf. Speechd registers the existence of the mimic3 module, but attempting to use it yields no output. Mimic3 server is confirmed running at http://localhost:59125/ and functions as expected with the installed voices.

I am running mimic3 as a systemd service using a podman container with the same parameters as outlined here.

Steps to Reproduce

  1. Place the following in $HOME/.config/containers/systemd/mimic3.container
    
    [Unit]
    Description=Podman Mimic3.service
    Wants=network-online.target
    After=network-online.target

[Service] Restart=on-failure TimeoutStartSec=900

[Container] Image=docker.io/mycroftai/mimic3:latest AutoUpdate=registry PublishPort=59125:59125 Volume=%h/.local/share/mycroft/mimic3:/home/mimic3/.local/share/mycroft/mimic3:Z

[Install] WantedBy=default.target

2. Run the container as a service using `systemctl --user start mimic3`
3. Add the following to `/etc/speech-dispatcher/speechd.conf`:

DefaultVoiceType "FEMALE1" DefaultLanguage "en" AddModule "mimic3-generic" "sd_generic" "mimic3-generic.conf" DefaultModule mimic3-generic


4. copy the example `/etc/speech-dispatcher/modules/mimic3-generic.conf` from github. 
5. Observe that the mimic3 server is running at `localhost:59125` and that voice output works as expected
6. Observe that `spd-say -O` and `spd-say -o mimic3-generic -L` output `mimic3-generic` and a list of configured voices, respectively.
7. Attempt to say something using `spd-say` using any of the installed voices; observe that nothing happens. 

**Expected behavior**
speech-dispatcher is able to use mimic3 voices to output text to speech audio.

**Log files**
`/var/log/mycroft` does not exist.

**Environment (please complete the following information):**
 - Device type: Laptop
 - OS: Fedora Silverblue
 - Mycroft-core version: N/A
 - Other versions: N/A

**Additional context**
Using the exact configuration above but installing mimic3 using pip rather than running as a container works as expected, but I would prefer to be able to run it as a container. Maybe I am just missing something obvious, but I have been troubleshooting this for a few days to no avail.