poc-elc-ai / src / text2speech.py
text2speech.py
Raw
import sys
from gtts import gTTS

def text2speech(text):
    tts = gTTS(text=text,  lang='en', tld='us', slow=False)
    return tts

if __name__ == "__main__":
    text = sys.argv[1]
    text2speech(text)