mimic3 icon indicating copy to clipboard operation
mimic3 copied to clipboard

Mimic3 TTS models failing to load with INVALID_PROTOBUF error

Open Saisei2004 opened this issue 1 year ago • 7 comments

I am encountering an issue with Mimic3 TTS models failing to load with the error "INVALID_PROTOBUF". Despite following the installation steps and ensuring the correct setup, the models are not loading correctly and the error persists.

Steps to reproduce the behavior:

Download and install the Mimic3 TTS models using the provided instructions.
Attempt to use the Mimic3 TTS models with the following command:

mimic3 --voice en_US/ljspeech_low "This is a test of the ljspeech voice model." > test_output_ljspeech.wav

Observe the error message: "Load model from /home/user/.local/share/mycroft/mimic3/voices/en_US/ljspeech_low/generator.onnx failed: Protobuf parsing failed."

The expected behavior is for the TTS model to load successfully and generate the audio output without errors.

Here are the relevant log files and error messages:

[ONNXRuntimeError] : 7 : INVALID_PROTOBUF : Load model from /home/user/.local/share/mycroft/mimic3/voices/en_US/ljspeech_low/generator.onnx failed: Protobuf parsing failed.

Environment:

Device type: Desktop
OS: Ubuntu 20.04
Mycroft-core version: N/A (using Mimic3 standalone)
Other versions: Mimic3 TTS version 0.2.5, Python 3.10

Additional context: I have tried downloading and using multiple voice models (en_US/ljspeech_low, en_US/cmu-arctic_low, en_US/vctk_low) and encountered the same error with each. I followed the installation and usage instructions carefully but have not been able to resolve the issue. Any guidance or suggestions to resolve this problem would be greatly appreciated.

Thank you for your assistance.

Saisei2004 avatar Jun 02 '24 17:06 Saisei2004

I tried cloning the mimic3 repository from GitHub and running the Dockerfile, but I encountered the same error.

Takuchan avatar Jun 09 '24 14:06 Takuchan

Inspect the contents of the onnx file. It is probably error text from a failed download due to GitHub. You may need manually download voices from Huggingface: https://huggingface.co/mukowaty/mimic3-voices

synesthesiam avatar Jun 09 '24 15:06 synesthesiam

Where do you put the downloaded files? Mimic3 doesn't run off the of the files cloned from the repository if installed based on the installation instructions which suggests the downloaded voice files need to be put somewhere special.

note to self: this is the least broken one ive tried so far (im going try every ai tts on github until i find one that actually works)

Xeraster avatar Jul 09 '24 03:07 Xeraster

Since I also ran into this issue today, I had a look at the problem. It is indeed a problem with downloading the generator.onnx file. That file is so large in size that it gets stored in Github's LFS (https://docs.github.com/repositories/working-with-files/managing-large-files/about-git-large-file-storage). This has the side-effect that a direct fetch via the URL https://github.com/MycroftAI/mimic3/blob/be72c185e471e3ef939147679df9e1d00262c513/mimic3_tts/const.py#L23 does not return the file-contents, but rather a so called pointer file. So currently after downloading, inside the filesystem generator.onnx contains for example:

version https://git-lfs.github.com/spec/v1
oid sha256:3330372429b25fe3a38b10bbe914862a49b2cd0a58da332bbe30fa123035a067
size 76340831

It requires multiple steps to get such an LFS-file, I found this very useful gist: https://gist.github.com/fkraeutli/66fa741d9a8c2a6a238a01d17ed0edc5

So, to fix this, it would be necessary to add this functionality to the downloader. In the meantime one can download the file manually for each voice.

magiausde avatar Jul 24 '24 23:07 magiausde

Where do you put the downloaded files? Mimic3 doesn't run off the of the files cloned from the repository if installed based on the installation instructions which suggests the downloaded voice files need to be put somewhere special.

note to self: this is the least broken one ive tried so far (im going try every ai tts on github until i find one that actually works)

The voices are stored at /home/mimic3/.local/share/mycroft/mimic3/voices/

magiausde avatar Jul 25 '24 00:07 magiausde

I get the following when trying to fetch voices from LFS: batch response: This repository is over its data quota. Account responsible for LFS bandwidth should purchase more data packs to restore access.

mephi42 avatar Aug 22 '24 17:08 mephi42

Any update on this ? @ken-mycroft @alan-mycroft

snwfdhmp avatar Nov 29 '24 01:11 snwfdhmp