Text_To_Speech_Using_Python

 Hello dudes,

Today we gonna see about how to generate audio from the text input using python.

Language: Python

IDE : Pycharm

Step 1 : The API (Application Programming Interface) we will be using here is gTTS (google Text To Speech), so our first step is to install this API by running the following code

pip install gTTS 

 

Step 2 :

Type the following code and execute:

Using this code we have freedom to  :

-> Change Text Input

-> Change Language 

-> Change Pace [Fast or Slow]

-> Save the generated audio

- > Play the generated audio

Note : texts after "#"  symbol are comments,otherwise called as non-executable statements which are given here only for the purpose of explanation.

 

Step 3: 

Yeah its time to run it!


 
The generated audio will be saved in the location of the code. After saving, media player (at first time you are required to choose your desired media player) will be opened automatically.

 
 There you go ! Here is the output.
 

 

Tip : You may use this to make birthday wishes to your close friend in decent words (Got it what i mean right?😆)

Ok dudes hope you all have learnt something out of this post. See you all in next post bubye! Enjoy Coding!


Comments

Popular posts from this blog

Coding in Mobile Phone!

BMI Calculator using python

Qr Code Generator using python