Error with Rhasspy and MaryTTS: TtsException non-zero exit code 7

Hello, I’m struggling to get the MaryTTS Docker image working for TTS, and would appreciate some guidance.

I set up MaryTTS as:
sudo docker run -d -p 59125:59125 --name marytts --restart unless-stopped synesthesiam/marytts:5.2 --voice cmu-slt-hsm
I can navigate to localhost:59125, and I see a web page for MaryTTS. However, when I set Rhasspy’s text-to-speech to MaryTTS with urL http://localhost:59125/process and prompt rhasspy to speak a test phrase (via the web portal), I get TtsException: Non-zero exit code: 7. The full traceback is below. Rhasspy works with other TTS choices.

[ERROR:2020-09-08 04:31:24,221] rhasspyserver_hermes: Non-zero exit code: 7
Traceback (most recent call last):
File “/usr/lib/rhasspy/.venv/lib/python3.7/site-packages/quart/”, line 1821, in full_dispatch_request
result = await self.dispatch_request(request_context)
File “/usr/lib/rhasspy/.venv/lib/python3.7/site-packages/quart/”, line 1869, in dispatch_request
return await handler(**request_.view_args)
File “/usr/lib/rhasspy/rhasspy-server-hermes/rhasspyserver_hermes/”, line 1612, in api_text_to_speech
results = await asyncio.gather(*aws)
File “/usr/lib/rhasspy/rhasspy-server-hermes/rhasspyserver_hermes/”, line 1598, in speak
File “/usr/lib/rhasspy/rhasspy-server-hermes/rhasspyserver_hermes/”, line 596, in speak_sentence
raise TtsException(say_response.error)
rhasspyserver_hermes.TtsException: Non-zero exit code: 7
[ERROR:2020-09-08 04:31:24,221] rhasspyserver_hermes: TtsError(error=‘Non-zero exit code: 7’, site_id=‘default’, context=‘2a517d99-3774-44b6-a90e-607f0e7fec29’, session_id=’’)
[DEBUG:2020-09-08 04:31:24,221] rhasspyserver_hermes: Handling TtsError (topic=hermes/error/tts, id=9bdd252e-aa50-4662-9df7-6136106e62bf)
[DEBUG:2020-09-08 04:31:24,200] rhasspyserver_hermes: Publishing 114 bytes(s) to hermes/tts/say
[DEBUG:2020-09-08 04:31:24,199] rhasspyserver_hermes: -> TtsSay(text=‘test’, site_id=‘default’, lang=None, id=‘2a517d99-3774-44b6-a90e-607f0e7fec29’, session_id=’’)

Do you also run rhasspy as a docker container ? In that case localhost will not work depending on how you set it up.

Whoops, sorry, I was trying to abstract away from the local IP address of my machine. Assume I meant [ip address], not localhost.
Yes, I’m running Rhasspy in a container.

I also successfully curl-ed [ip_address]:59125/process from the Rhasspy container and got back a complaint about the request not being in the correct format. I think that indicates that the ability to reach the MaryTTS docker container is likely not the problem?

Try without /process in the url for Rhasspy. I can’t remember if I add that or not automatically.

You can also test with --network host in the docker run command.

I had somehow managed to start the MaryTTS server without selecting a voice – maybe i mistyped the --voice command when starting the docker container? Solved now, thanks.

1 Like