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)