SIZ TUTORIAL - HOW TO MAKE TEXT TO SPEECH PROGRAM WITH PYTHON

in Steem Infinity Zone3 years ago (edited)

image.png
source


Hello, steemit family :)
It's been a long time I haven't posted anything other than reports and the work I have been assigned to.
It's my first tutorial in the SIZ community.

This tutorial will be different and interesting as well as the easiest.
That was the first project I made with python language. I hope you would like it.

So what's the project and what I am going to make?
It would be a text-to-speech program. As you people have seen there are many softwares have been made that convert the text into speech. Normally people use them to listen to audio and audiobooks as well.

what do you have to do?
If you are new to programming and don't know about any language then go to google browser and download the python and pycharm. When it would be downloaded then open the pycharm and create a new file named it as you want.

firstly you have to install the library. In terminal write;


pip install gTTS


gTTS means Google test to speech. For more information, you can read its documentation

Then we will give it some time to install and after installation, we will import the required library and module.


from gtts import gTTS
import os


Then we will write the text that we want to convert into speech.

mytext = "Hello,steemit family. It's me the country representative of Pakistan. I love steemit and totally addicted to it. I am always here for you, to guide and for your growth. Just comment in this post if you want to ask anything. "

then we will select the language English.


language = "en"


Write the code to convert the text to speech mp3.


output = gTTS(text=mytext, lang=language, slow=False) output.save("output.mp3") os.system("start output.mp3")
This is final how your program will look.

image.png

PLAY THE VIDEO TO SEE THE OUTPUT

You can convert any text to mp3 with the help of this program.

image.png


Thank you!
Yours vvarsiahyy

Sort:  
 3 years ago 
Wow @vvarishayy you are doing a great job because you have a very great skills in the first i am don't know about python language but now I see your tutorials and now with the help of your tutorial i got some information about python language. Thanks for sharing information about it. I really like your post. It is very difficult i appreciate your work.

divider3mqf93qRC7L6ehes1x.png

@vvarishayy
@sizcomments

Take part in this contest

Divider 1.png


 3 years ago 

Python is easy to learn and user-friendly. I am glad you learned something from my post. if you want to learn I can think to start a course on python as well. Have a nice day!

 3 years ago 

Yes of course it is very good if you start your course because you have very great knowledge about python language.
I am very glad to see your post.

 3 years ago 

Perfect @vvarishay i really appreciate your talent. Keep it up,
Can we download this library from internet?

#sizcomments

 3 years ago 

Thank you ❣️
Download the python, all the libraries are already downloaded. We just have to install it through the terminal or command prompt.

 3 years ago 

@vvarishayy
I have read your post and before reading your post I don't know anything about python.Your post is very important.I really appreciate your efforts.
Thanks for sharing an informative post.
#sizcomments
https://steemit.com/hive-181430/@vvarishayy/siz-tutorial-how-to-make-text-to-speech-program-with-python

Very interesting!

Coin Marketplace

STEEM 0.27
TRX 0.13
JST 0.032
BTC 62737.73
ETH 2925.66
USDT 1.00
SBD 3.50