Advertisement
Lukegotjellyfihs

Python 3.9 TTS module testing

Feb 1st, 2023 (edited)
752
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.62 KB | Source Code | 0 0
  1. import os
  2.  
  3. tts_models = [
  4.     "tts_models/en/ek1/tacotron2",
  5.     "tts_models/en/ljspeech/tacotron2-DDC",
  6.     "tts_models/en/ljspeech/tacotron2-DDC_ph",
  7.     "tts_models/en/ljspeech/glow-tts",
  8.     "tts_models/en/ljspeech/speedy-speech",
  9.     "tts_models/en/ljspeech/tacotron2-DCA",
  10.     "tts_models/en/ljspeech/vits",
  11.     "tts_models/en/ljspeech/vits--neon",
  12.     "tts_models/en/ljspeech/fast_pitch",
  13.     "tts_models/en/ljspeech/overflow",
  14.     "tts_models/en/vctk/vits",
  15.     "tts_models/en/vctk/fast_pitch",
  16.     "tts_models/en/sam/tacotron-DDC",
  17.     "tts_models/en/blizzard2013/capacitron-t2-c50",
  18.     "tts_models/en/blizzard2013/capacitron-t2-c150_v2",
  19. ]
  20.  
  21. vocoder_models = [
  22.     "vocoder_models/universal/libri-tts/wavegrad",
  23.     "vocoder_models/universal/libri-tts/fullband-melgan",
  24.     "vocoder_models/en/ek1/wavegrad",
  25.     "vocoder_models/en/ljspeech/multiband-melgan",
  26.     "vocoder_models/en/ljspeech/hifigan_v2",
  27.     "vocoder_models/en/ljspeech/univnet",
  28.     "vocoder_models/en/blizzard2013/hifigan_v2",
  29.     "vocoder_models/en/vctk/hifigan_v2",
  30.     "vocoder_models/en/sam/hifigan_v2",
  31. ]
  32.  
  33. test_text = "Who’s there? Artyom - go have a look!"
  34.  
  35. for model_index, model in enumerate(tts_models):
  36.     model_name = model.split("/")[-1]
  37.     os.system(f'tts --model_name "{model}" --text "{test_text}" --out_path "{model_name}".wav')
  38.     for vocoder_index, vocoder in enumerate(vocoder_models):
  39.         vocoder_name = vocoder.split("/")[-1]
  40.         output_name = f"{model_name} + {vocoder_name}"
  41.         os.system(f'tts --model_name "{model}" --vocoder_name "{vocoder}" --text "{test_text}" --out_path "{output_name}".wav')
  42.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement