CHANGE ANY TEXT INTO VOICE USING PYTHON CODE


Steps to follow : –

  1. Import pyttsx3 module
  2. Create speak function
  3. Access init function
  4. Give input as text on calling speak function
  5. Convert text into voice.
  6. Then call runAndWait function for execution
  7. See the output

Python Code

import pyttsx3
def speak(audio):
engine=pyttsx3.init()
engine.say(audio)
engine.runAndWait()
speak(“Hello Deepak !!! How are you !!! What are you doing !!! Thank you…”)

To follow my blog to click below

© WebCoder.com

Please follow me on social media pages : –

Facebook

Twitter

LinkedIn

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s