I installed Mycroft using the git method a few days ago on my Ubuntu 20.04 LTS desktop. Worked great until I tried to install mimic3; now I don’t have any TTS. It fails to load the mimic3 backend and makes no sound when trying to fall back to mimic 1 (I think). Here’s the error I see in /var/log/mycroft/audio.log
:
2022-08-14 17:14:20.055 | INFO | 61043 | mycroft.tts.tts:create:609 | Loaded plugin mimic3_tts_plug
2022-08-14 17:14:20.062 | ERROR | 61043 | mycroft.tts.tts:create:618 | The selected TTS backend couldn't be loaded. Falling back to Mimic
Traceback (most recent call last):
File "/home/user/Downloads/mycroft/mycroft-core/mycroft/tts/tts.py", line 613, in create
tts = clazz(tts_lang, tts_config)
File "/home/user/Downloads/mycroft/mycroft-core/.venv/lib/python3.8/site-packages/mycroft_plugin_tts_mimic3/__init__.py", line 110, in __init__
self.tts.preload_voice(voice)
File "/home/user/Downloads/mycroft/mycroft-core/.venv/lib/python3.8/site-packages/mimic3_tts/tts.py", line 310, in preload_voice
self._get_or_load_voice(key_to_load)
File "/home/user/Downloads/mycroft/mycroft-core/.venv/lib/python3.8/site-packages/mimic3_tts/tts.py", line 579, in _get_or_load_voice
voice = Mimic3Voice.load_from_directory(
File "/home/user/Downloads/mycroft/mycroft-core/.venv/lib/python3.8/site-packages/mimic3_tts/voice.py", line 283, in load_from_directory
onnx_model = Mimic3Voice._load_model(
File "/home/user/Downloads/mycroft/mycroft-core/.venv/lib/python3.8/site-packages/mimic3_tts/voice.py", line 403, in _load_model
onnx_model = onnxruntime.InferenceSession(
File "/home/user/Downloads/mycroft/mycroft-core/.venv/lib/python3.8/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 347, in __init__
self._create_inference_session(providers, provider_options, disabled_optimizers)
File "/home/user/Downloads/mycroft/mycroft-core/.venv/lib/python3.8/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 375, in _create_inference_session
raise ValueError(
ValueError: This ORT build has ['TensorrtExecutionProvider', 'CUDAExecutionProvider', 'CPUExecutionProvider'] enabled. Since ORT 1.9, you are required to explicitly set the providers parameter when instantiating InferenceSession. For example, onnxruntime.InferenceSession(..., providers=['TensorrtExecutionProvider', 'CUDAExecutionProvider', 'CPUExecutionProvider'], ...)
I installed mimic3 following the MycroftAI/plugin-tts-mimic3
instructions. I used mycroft-pip install mycroft-plugin-tts-mimic3
when I got to that step, to install English only. I first tried the Debian package, and now I’m using a mimic3 Docker container.
The mimic3 web UI seems to work at localhost port 59125. I can set it to English and pick any of the voices and it renders audio just fine. It worked when I was using the Debian package, too.
I’m starting the mimic3 Docker container like so:
docker run \
--rm \
-it \
--name mimic3 \
-p 59125:59125 \
-v "${HOME}/.local/share/mycroft/mimic3:/home/mimic3/.local/share/mycroft/mimic3" \
'mycroftai/mimic3'
Here’s the container output:
INFO:__main__:Starting web server
[2022-08-15 00:15:53 +0000] [1] [INFO] Running on http://0.0.0.0:59125 (CTRL + C to quit)
INFO:hypercorn.error:Running on http://0.0.0.0:59125 (CTRL + C to quit)
INFO:mimic3_tts.tts:Loaded voice from /home/mimic3/.local/share/mycroft/mimic3/voices/en_US/cmu-arctic_low
Here’s the tts
section of my mycroft.conf
:
{
"pulse_duck": false,
"module": "mimic3_tts_plug",
"polly": {
"voice": "Matthew",
"region": "us-east-1",
"access_key_id": "",
"secret_access_key": ""
},
"mimic": {
"voice": "ap"
},
"mimic2": {
"lang": "en-us",
"url": "https://mimic-api.mycroft.ai/synthesize?text=",
"preloaded_cache": "/opt/mycroft/preloaded_cache/Mimic2"
},
"espeak": {
"lang": "english-us",
"voice": "m1"
},
"mozilla": {
"url": "https://tts.example.com/"
},
"mimic3_tts_plug": {
"voice": "en_US/cmu-arctic_low",
"speaker": "slt",
"length_scale": 0.8,
"noise_scale": 0.667,
"noise_w": 0.8
}
}
I was using my own TTS server a bit, that’s why there’s a mozilla
section.