152334H / tortoise-tts-fast

Fast TorToiSe inference (5x or your money back!)
GNU Affero General Public License v3.0
759 stars 177 forks source link

What happened to read.py in this fork? #47

Closed xenotropic closed 1 year ago

xenotropic commented 1 year ago

It seems read.py was working for a while, there were several issues referencing it and fixes to it. Then it seems to have been summarily deleted with a "remove read" comment on Feb 26. Is that long-text-file-with-custom-separator functionality here already somewhere? Was there something really broken about it? I would like to use it along with the added speed and other functionality here -- I'm rendering whole Wikipedia articles, see here point 2 for an RSS feed of them -- and want to avoid re-inventing any wheels.

152334H commented 1 year ago

everything was thrown into a single clean script, cf #27

You can just input a long text file into the stdin of the new script:

python3 scripts/tortoise_tts.py < mytextfile.txt
rikabi89 commented 1 year ago

Any clue how to get each line to save separately rather than combing the audio and save it specific file name e.g LJ001-0001.wav and so on?

demonauthor commented 1 year ago

Related question: python3 scripts/tortoise_tts.py < mytextfile.txt

I'm missing something. Where in the folder structure to we place the .txt file for it to be read? I tried using the entire path and the audio file was just the voice reading the path, and not the text.

xenotropic commented 1 year ago

@rikabi89 The default behavior I'm getting, when reading an audio file from stdin, is that each "chunk" is written out as a separate wav file of the file format [voice_name]_00.wav , and then they are all combined into [voice_name]_combined.wav. I'm not sure how you're not getting that behavior. It's not necessarily each line, though; it breaks up into chunks which can be varied by --text_split, like I'm doing --text_split "150,200" with 16GB GPU to avoid stop token errors (effectively OOM errors). The ability to split on the | character that is in the main read.py sadly seems to be gone after this command line refactoring.

@demonauthor You can put it where ever you want to. If it's not in the current directory then you need to give the fully qualified path. With linux or linux-like shells you can test with cat < mytextfile.txt which should print out the file contents.

demonauthor commented 1 year ago

@xenotropic That works. Thanks. I was including the entire path C:/entire/path It just wants the folder within my tts-fast environment.