neonbjb / tortoise-tts

A multi-voice TTS system trained with an emphasis on quality
Apache License 2.0
12.35k stars 1.73k forks source link

Tortoise-TTS - RuntimeError: torch.cat(): expected a non-empty list of Tensors #473

Open Tonoue2 opened 1 year ago

Tonoue2 commented 1 year ago

Trying to get Tortoise to compile a text file into a voice clip. This is installed on a Windows 10 x64 machine.

I can get Tortoise-TTS to work with simple sentences (Thank you @zecloud from #472)

I can do this using the follow command: python tortoise/do_tts.py --text "Hello world. This is tortoise-tts" --voice random --preset fast

This works fine, but when using the read.py command. I get the following output: (tortoise) C:\Users\JoeTo\anaconda3\tortoise-tts\tortoise-tts>python tortoise/read.py --textfile read.txt --voice random Traceback (most recent call last): File "C:\Users\JoeTo\anaconda3\tortoise-tts\tortoise-tts\tortoise\read.py", line 76, in full_audio = torch.cat(all_parts, dim=-1) RuntimeError: torch.cat(): expected a non-empty list of Tensors

The textfile is in the directory as the read.py command. (C:\Users\JoeTo\anaconda3\tortoise-tts\tortoise-tts\tortoise\read.py) I've tried it with quotations and ./ before the file name. Get the same output.

Any help is appreciated! Thank you.

necarlson97 commented 10 months ago

Apologies if this is no help - are you absolutely sure the text file has text? I was receiving this when accidentally inputting a 0kb empty text file. (Perhaps I could write up a quick check in the python for a PR that provides a more human readable text error message, if an empty file is indeed what you saw as well)

Tonoue2 commented 10 months ago

Apologies if this is no help - are you absolutely sure the text file has text? I was receiving this when accidentally inputting a 0kb empty text file. (Perhaps I could write up a quick check in the python for a PR that provides a more human readable text error message, if an empty file is indeed what you saw as well)

Yup. I copied some text into a new text file, made some grammatical changes, and made sure to save it before trying. Even saved it again afterward having that same thought. No change.