Search This Blog

Text to Speech in python.pyttsx3

Text to Speech in python.pyttsx3

pip install pyttsx3

import pyttsx3

engine=pyttsx3.init()

voices=engine.getProperty('voices')
engine.setProperty('voice',voices[1].id)
f="hello world")
#f=open("your_file_path").read()

engine.say(f)

engine.runAndWait()

SHARE

Abu Sayed

  • Image
  • Image
  • Image
  • Image
  • Image

2 comments:

  1. It is the kind of information I have been trying to find. Thank you for writing this information. It has proved utmost beneficial for me. realistic human like voices

    ReplyDelete