Nov-24-2020, 09:40 AM
i have been messing around with text the speech module pyttsx3, I have two computers that I am working with, one is a mac and the other is a linux the voice id 14 on the mac is ideal but the voice id 14 on the linux is horrid.
i got to looking into this and i think its because of the nssSpeech synthesizer is on the mac and Espeak is on linux. so i guess its espeak that has terrible voices, so i found flite , it had a usable voice but i couldnt find a way to pip install that...
i went over to pyttsx3 doc page trying to figure out the proper syntax but i didnt fully understand it....
what i am wondering is can i assign flite or any other speech synthesizer as the driver for the pyttsx3 engine? here is what ive tried that didnt work...
i got to looking into this and i think its because of the nssSpeech synthesizer is on the mac and Espeak is on linux. so i guess its espeak that has terrible voices, so i found flite , it had a usable voice but i couldnt find a way to pip install that...
i went over to pyttsx3 doc page trying to figure out the proper syntax but i didnt fully understand it....
what i am wondering is can i assign flite or any other speech synthesizer as the driver for the pyttsx3 engine? here is what ive tried that didnt work...
import pyttsx3 engine = pyttsx3.init('flite') voice = engine.getProperty("voices") engine.setProperty('voice',voice[14].id) newvoiceRate = 135 engine.setProperty('rate' , newvoiceRate) def speak(audio): engine.say(audio) engine.runAndWait() speak("hello, this is my voice , this isnt quite the voice that you want.")