SHARE
TWEET

Untitled

a guest Feb 17th, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from gtts import gTTS
  2. import playsound
  3. import os
  4.    
  5. while 1:
  6.     text = input("Input Text:")
  7.     tts = gTTS(text=text,lang='th')
  8.     tts.save('sound.mp3')
  9.     playsound.playsound('sound.mp3', True)
  10.     os.system('rm sound.mp3')
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top