0

I am writing a voice assistant in python, and I have a question about how to change the voice that pronounces the words of my voice assistant. Windows 10 operating system. I tried RHVoice but it didn't work. The question is, how can I change my voice in a voice assistant in Python that would support Russian? Here is an example of how I implemented the assistant's speech playback function:

def talk(words):
    engine = pyttsx3.init()
    engine.say(words)
    engine.runAndWait()
  • 2
    Wait, what's your question? You say you have a question but don't actually ask one. Are you simply asking how to change the voice? You can [edit] to clarify. BTW welcome to SO! Check out the [tour] and [ask] if you want advice. – wjandrea Jun 30 '20 at 19:40
  • 2
    If you're asking *how* to change the voice, what have you already researched, and what have you tried? I haven't used pyttsx3 myself, but this looks promising: [How to change the voice in pyttsx3?](https://stackoverflow.com/q/44858120/4518341) – wjandrea Jun 30 '20 at 19:43

1 Answers1

0

Here You Will Not Get any Option to Change the Voice But You Can Change in these Lines

engine = pyttsx3.init('sapi5')
voices = engine.getProperty('voices')
currentVoice = engine.setProperty('voice', voices[1].id)

in the Last Line You Have to Change the Voice, 1 is for Default Female and 0 is for Default Male Voice of Windows 10. You would need to Download External Voices if You Want to Add Them