Hi
Can I pass a text file to the PWgan synthesize.py like i do with the training of the TTS?
I have noticed that if I run synthesize.py several times with different sentences, the tonation/expression of the voice sometimes change.
I am setting up variables in Colab to easily be able to pass it to the python script like so:
out_dir = “’/content/drive/My Drive/output’”
speech = “‘This is a test sentence’”
Could i do something like
speech = “’/content/drive/My Drive/sentences.txt’”
I’ve also noticed that i get problems when using
speech = “‘I’m a noob and I’m really bad at this shit’”
due to the single quotation marks. Is there any way around it? Obviously I want to be able to write “I’m” and not “Im”
No need to be embarrassed I have never tried it, but I imagine something like
file = open(“file.txt”).readlines()
for line in file:
speech = line
may work. Although the notebooks spit a sentence and then you have to run it again, so I don’t know. If you want to do it locally on your computer, you can try something like
cat lines.txt | while read LINE; do python3 synthesize.py $LINE config model out_dir; done
Thanks, but i kind of wanted to avoid running it several times due to the fact that i has caused the output to sound different every time. This is not the case if i run a single long sentence.
Well you have to choose. LSTMs are not great with long sequences, so it makes sense to synthesize shorter batches. With a dataset that is extensive, has no transcription errors and has adequate diphone/triphone distributions, you can synthesize text of up to 5000 characters. With LJSpeech, the longer I have achieved has been 1000 characters. This all in one take.
My datasets usually do not have these. You can label them if you want to keep them. Taco2 can learn to model them if it is presented with a lot of examples.