Search code examples
pythonwindows-10pyttsx3

How to add voices to AI program in python


I have made an AI using python and the default voice for text to speech is set as Microsoft David but when i try to change it there are only two voices whereas i have installed others also from settings which are not shown there.

Any chance to add more voices.

Thanks


Solution

  • Well there is a good reason for this.

    pyttsx3 can only access the voices at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\Voices\Tokens\

    However this has to do with registry files so you should really be careful if you do not know with what you are messing around. There is probably the answer you are looking for. voice/language change pyttsx3

    WARNING

    Please before trying anything backup your registry files or even your system if you do not know with what you are messing around.