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):
Tacotron2+Waveglow
TorToiSe
"
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'
'
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'
{txt}
'
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) + "
"
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)