Answers for "pyttsx3 voice"

1

how to change the rate of speech in pyttsx3

import pyttsx3

engine = pyttsx3.init()
engine.setProperty("rate", 178)
engine.say("I am the text spoken after changing the speech rate.")
engine.runAndWait()
Posted by: Guest on May-02-2020
0

how to change voice of pyttsx3

import pyttsx3
engine = pyttsx3.init()
voices = engine.getProperty('voices')
engine.setProperty('voice', voices[0].id) #changing index changes voices but ony 0 and 1 are working here
engine.say('Hello World')
engine.runAndWait()
Posted by: Guest on March-23-2021

Python Answers by Framework

Browse Popular Code Answers by Language