Hey there!
I recently switched to Watson TTS for German speech synthesis and it works great most of the time!
But if I haven’t let Mycroft say something for a longer interval of time, the first thing he says will always fail for some reason, meaning that he simply has no audio output, but the answer is still visible in the CLI.
The error in the audio.log file looks as follows:
2022-03-22 18:16:59.354 | ERROR | 699 | mycroft.audio.speech:mute_and_speak:134 | TTS execution failed.
Traceback (most recent call last):
File "/home/pi/mycroft-core/.venv/lib/python3.7/site-packages/urllib3/connectionpool.py", line 449, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/home/pi/mycroft-core/.venv/lib/python3.7/site-packages/urllib3/connectionpool.py", line 444, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.7/http/client.py", line 1352, in getresponse
response.begin()
File "/usr/lib/python3.7/http/client.py", line 310, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.7/http/client.py", line 271, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/lib/python3.7/socket.py", line 589, in readinto
return self._sock.recv_into(b)
File "/usr/lib/python3.7/ssl.py", line 1052, in recv_into
return self.read(nbytes, buffer)
File "/usr/lib/python3.7/ssl.py", line 911, in read
return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/pi/mycroft-core/.venv/lib/python3.7/site-packages/requests/adapters.py", line 450, in send
timeout=timeout
File "/home/pi/mycroft-core/.venv/lib/python3.7/site-packages/urllib3/connectionpool.py", line 786, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/home/pi/mycroft-core/.venv/lib/python3.7/site-packages/urllib3/util/retry.py", line 550, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/home/pi/mycroft-core/.venv/lib/python3.7/site-packages/urllib3/packages/six.py", line 770, in reraise
raise value
File "/home/pi/mycroft-core/.venv/lib/python3.7/site-packages/urllib3/connectionpool.py", line 710, in urlopen
chunked=chunked,
File "/home/pi/mycroft-core/.venv/lib/python3.7/site-packages/urllib3/connectionpool.py", line 451, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File "/home/pi/mycroft-core/.venv/lib/python3.7/site-packages/urllib3/connectionpool.py", line 341, in _raise_timeout
self, url, "Read timed out. (read timeout=%s)" % timeout_value
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='api.eu-de.text-to-speech.watson.cloud.ibm.com', port=443): Read timed out. (read timeout=10)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/pi/mycroft-core/mycroft/tts/remote_tts.py", line 54, in execute
self.__play(req)
File "/home/pi/mycroft-core/mycroft/tts/remote_tts.py", line 83, in __play
resp = req.result()
File "/usr/lib/python3.7/concurrent/futures/_base.py", line 432, in result
return self.__get_result()
File "/usr/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
raise self._exception
File "/usr/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/pi/mycroft-core/.venv/lib/python3.7/site-packages/requests/sessions.py", line 529, in request
resp = self.send(prep, **send_kwargs)
File "/home/pi/mycroft-core/.venv/lib/python3.7/site-packages/requests/sessions.py", line 645, in send
r = adapter.send(request, **kwargs)
File "/home/pi/mycroft-core/.venv/lib/python3.7/site-packages/requests/adapters.py", line 532, in send
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='api.eu-de.text-to-speech.watson.cloud.ibm.com', port=443): Read timed out. (read timeout=10)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/pi/mycroft-core/mycroft/audio/speech.py", line 129, in mute_and_speak
tts.execute(utterance, ident, listen)
File "/home/pi/mycroft-core/mycroft/tts/remote_tts.py", line 56, in execute
LOG.error(e.message)
AttributeError: 'ReadTimeout' object has no attribute 'message'
Maybe someone understands how to possibly fix this
Best regards,
Elias.