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

Getting 404 errors #54

Closed Slyke closed 10 months ago

Slyke commented 10 months ago

Describe the bug It errors when clicking speak.

To Reproduce Steps to reproduce the behavior:

  1. Install with Docker or Kubernetes.
  2. Click "Speak"

Expected behavior It should speak

Log files

Traceback (most recent call last):
  File "/home/mimic3/app/mimic3_http/synthesis.py", line 125, in do_synthesis_proc
    result = do_synthesis(item, mimic3)
  File "/home/mimic3/app/mimic3_http/synthesis.py", line 81, in do_synthesis
    raise e
  File "/home/mimic3/app/mimic3_http/synthesis.py", line 61, in do_synthesis
    mimic3.speak_text(params.text, text_language=params.text_language)
  File "/home/mimic3/app/mimic3_tts/tts.py", line 368, in speak_text
    voice = self._get_or_load_voice(self.voice)
  File "/home/mimic3/app/mimic3_tts/tts.py", line 569, in _get_or_load_voice
    maybe_model_dir = self._download_voice(voice_key)
  File "/home/mimic3/app/mimic3_tts/tts.py", line 621, in _download_voice
    download_voice(
  File "/home/mimic3/app/mimic3_tts/download.py", line 140, in download_voice
    raise VoiceDownloadError(
mimic3_tts.download.VoiceDownloadError: Failed to download file for voice af_ZA/google-nwu_low from https://github.com/MycroftAI/mimic3-voices/raw/master/voices/af_ZA/google-nwu_low/generator.onnx: HTTP Error 404: Not Found
ERROR:mimic3_http.app:Failed to download file for voice af_ZA/google-nwu_low from https://github.com/MycroftAI/mimic3-voices/raw/master/voices/af_ZA/google-nwu_low/generator.onnx: HTTP Error 404: Not Found
Traceback (most recent call last):
  File "/home/mimic3/app/mimic3_tts/download.py", line 121, in download_voice
    with urllib.request.urlopen(file_url) as response:
  File "/usr/lib/python3.9/urllib/request.py", line 214, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.9/urllib/request.py", line 523, in open
    response = meth(req, response)
  File "/usr/lib/python3.9/urllib/request.py", line 632, in http_response
    response = self.parent.error(
  File "/usr/lib/python3.9/urllib/request.py", line 555, in error
    result = self._call_chain(*args)
  File "/usr/lib/python3.9/urllib/request.py", line 494, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.9/urllib/request.py", line 747, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "/usr/lib/python3.9/urllib/request.py", line 523, in open
    response = meth(req, response)
  File "/usr/lib/python3.9/urllib/request.py", line 632, in http_response
    response = self.parent.error(
  File "/usr/lib/python3.9/urllib/request.py", line 561, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.9/urllib/request.py", line 494, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.9/urllib/request.py", line 641, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/mimic3/app/.venv/lib/python3.9/site-packages/quart/app.py", line 1673, in full_dispatch_request
    result = await self.dispatch_request(request_context)
  File "/home/mimic3/app/.venv/lib/python3.9/site-packages/quart/app.py", line 1718, in dispatch_request
    return await self.ensure_async(handler)(**request_.view_args)
  File "/home/mimic3/app/mimic3_http/app.py", line 215, in app_tts
    wav_bytes = await text_to_wav(
  File "/home/mimic3/app/mimic3_http/app.py", line 103, in text_to_wav
    wav_bytes = await future
  File "/home/mimic3/app/mimic3_http/synthesis.py", line 125, in do_synthesis_proc
    result = do_synthesis(item, mimic3)
  File "/home/mimic3/app/mimic3_http/synthesis.py", line 81, in do_synthesis
    raise e
  File "/home/mimic3/app/mimic3_http/synthesis.py", line 61, in do_synthesis
    mimic3.speak_text(params.text, text_language=params.text_language)
  File "/home/mimic3/app/mimic3_tts/tts.py", line 368, in speak_text
    voice = self._get_or_load_voice(self.voice)
  File "/home/mimic3/app/mimic3_tts/tts.py", line 569, in _get_or_load_voice
    maybe_model_dir = self._download_voice(voice_key)
  File "/home/mimic3/app/mimic3_tts/tts.py", line 621, in _download_voice
    download_voice(
  File "/home/mimic3/app/mimic3_tts/download.py", line 140, in download_voice
    raise VoiceDownloadError(
mimic3_tts.download.VoiceDownloadError: Failed to download file for voice af_ZA/google-nwu_low from https://github.com/MycroftAI/mimic3-voices/raw/master/voices/af_ZA/google-nwu_low/generator.onnx: HTTP Error 404: Not Found

You may also include screenshots, however screenshots of log files are often difficult to read and parse. image

Environment (please complete the following information):

Additional context I'm using docker image 0.2.4, which should be the latest one. If I manually go to the github page for the file in question and click "raw" to download manually, it also 404s: https://github.com/MycroftAI/mimic3-voices/blob/master/voices/af_ZA/google-nwu_low/generator.onnx

It seems to be doing this for every voice I test. Is this a github issue?

krisgesling commented 10 months ago

Most likely a change in how Github is handling larger files like this.

If you head to the file in a browser and hit the download button just to the right of "raw" it seems to still exist: https://github.com/MycroftAI/mimic3-voices/blob/master/voices/af_ZA/google-nwu_low/generator.onnx

However more importantly I'd probably start looking at Piper, it's the unofficial successor to Mimic3 now that Mycroft as a company has shut down. In short - Mike from Rhasspy built Larynx TTS, then came to Mycroft and built Mimic3, and Piper is his newest project with the same goal. https://github.com/rhasspy/piper

Slyke commented 10 months ago

Seems like github has fixed it now!