Skip to content

Instantly share code, notes, and snippets.

@rocket-pig
Created March 26, 2018 07:56
Show Gist options
  • Save rocket-pig/393b752fb0c5bb43e03ff5b6d1c1cf74 to your computer and use it in GitHub Desktop.
Save rocket-pig/393b752fb0c5bb43e03ff5b6d1c1cf74 to your computer and use it in GitHub Desktop.
A wrapper around Kyubyong's mindblowing TTS Tensorflow project https://github.com/Kyubyong/dc_tts
#!/usr/bin/python
import os,sys,shutil
from playsound import playsound
phrase = sys.argv[1]
with open('harvard_sentences.txt','w') as f:
f.write("some horseshit it never reads this line\n1. "+str(phrase)+"\n")
os.system('python synthesize.py')
phrase=phrase.replace(" ","")
shutil.move('samples/1.wav','backup/'+phrase+'.wav')
playsound('backup/'+phrase+'.wav')
@Sadam1195
Copy link

In case anyone wonder how to use this.

  • Download repo and pretrained model
  • download this wrapper.py file and place it in repo
  • and run following command in terminal

python wrapper.py "Some text here"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment