From cf7a4bc7e773465a8e913228d642b81ca0475eb7 Mon Sep 17 00:00:00 2001 From: James Betker Date: Tue, 26 Apr 2022 10:45:02 -0600 Subject: [PATCH] add reference clips to examples --- samples_generator.py | 51 +++++++++++++++++++++++++++++++++++++++ tortoise_v2_examples.html | 1 + 2 files changed, 52 insertions(+) create mode 100644 samples_generator.py diff --git a/samples_generator.py b/samples_generator.py new file mode 100644 index 0000000..e2b36d3 --- /dev/null +++ b/samples_generator.py @@ -0,0 +1,51 @@ +import os + +# This script builds the sample webpage. + +if __name__ == '__main__': + result = "These words were never spoken.

Handpicked results

" + for fv in os.listdir('results/favorites'): + url = f'https://github.com/neonbjb/tortoise-tts/raw/main/results/favorites/{fv}' + result = result + f'
\n' + + result = result + "

Handpicked longform result:

" + url = f'https://github.com/neonbjb/tortoise-tts/raw/main/results/favorite_riding_hood.mp3' + result = result + f'
\n' + + result = result + "

Compared to Tacotron2 (with the LJSpeech voice):

" + for k in range(2,5,1): + url1 = f'https://github.com/neonbjb/tortoise-tts/raw/main/results/tacotron_comparison/{k}-tacotron2.mp3' + url2 = f'https://github.com/neonbjb/tortoise-tts/raw/main/results/tacotron_comparison/{k}-tortoise.mp3' + result = result + f'' \ + f'' + result = result + "
Tacotron2+WaveglowTorToiSe

\n

\n
" + + result = result + "

Various spoken texts for all voices:

" + voices = ['angie', 'daniel', 'deniro', 'emma', 'freeman', 'geralt', 'halle', 'jlaw', 'lj', 'myself', + 'pat', 'snakes', 'tom', 'train_atkins', 'train_dotrice', 'train_kennard', 'weaver', 'william'] + lines = ['' + ''.join([f'' for v in voices])] + line = f'' + for v in voices: + url = f'https://github.com/neonbjb/tortoise-tts/raw/main/voices/{v}/1.wav' + line = line + f'' + line = line + "" + lines.append(line) + for txt in os.listdir('results/various/'): + if 'desktop' in txt: + continue + line = f'' + for v in voices: + url = f'https://github.com/neonbjb/tortoise-tts/raw/main/results/various/{txt}/{v}.mp3' + line = line + f'' + line = line + "" + lines.append(line) + result = result + '\n'.join(lines) + "
text{v}
reference clip
{txt}
" + + result = result + "

Longform result for all voices:

" + for lf in os.listdir('results/riding_hood'): + url = f'https://github.com/neonbjb/tortoise-tts/raw/main/results/riding_hood/{lf}' + result = result + f'
\n' + + result = result + "" + with open('result.html', 'w', encoding='utf-8') as f: + f.write(result) diff --git a/tortoise_v2_examples.html b/tortoise_v2_examples.html index 46e2e9b..401001c 100644 --- a/tortoise_v2_examples.html +++ b/tortoise_v2_examples.html @@ -24,6 +24,7 @@

Various spoken texts for all voices:

+
textangiedanieldeniroemmafreemangeralthallejlawljmyselfpatsnakestomtrain_atkinstrain_dotricetrain_kennardweaverwilliam
reference clip
autoregressive_ml
bengio_it_needs_to_know_what_is_bad
dickinson_stop_for_death