text to speech using python

TEXT TO SPEECH USING  PYTHON


first you have install voice converter

1 . you should have to connect to internet.

2. open command prompt and type - pip install  gTTs


then open editor tool like python idle ,visual code etc 
                                      
*  if use python idle

it is used to convert machine language into 





 you can download python through here.    

Download 

download it and install it according to system requirement 

open python idle 
then type code -


from gtts import gTTS 
import os 
mytext = ' I'm sorry  so I want to confess !'
language = 'en'
myobj = gTTS(text=mytext, lang=language,   slow=False)
myobj.save("dead.mp3") 
os.system("start dead.mp3")
save it 
And save it as dead.mp3
and run it by press F5 or run module 

text to speech using python text to speech using python Reviewed by Hack on September 16, 2019 Rating: 5

No comments:

Powered by Blogger.