I am trying to use pyttsx3 to say French text. However, only English is available.
Following the advice of How to change the voice in pyttsx3?, I tried to install the French speech pack as explained here https://support.office.com/en-us/article/how-to-download-text-to-speech-languages-for-windows-10-d5a6b612-b3ae-423f-afa5-4f6caf1ec5d3.
I restarted my computer and now have the French speech to text module installed and available under the “voice” menu in the windows settings. The test button works and I hear the test sample in French.
I tried to run the following code to see what pyttsx3 has available:
import pyttsx3
engine = pyttsx3.init()
voices = engine.getProperty('voices')
for voice in voices:
print(voice, voice.id)
engine.setProperty('voice', voice.id)
engine.say("Hello World!")
engine.runAndWait()
engine.stop()
However, I just get the following output:
<Voice id=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\Voices\Tokens\TTS_MS_EN-US_ZIRA_11.0
name=Microsoft Zira Desktop - English (United States)
languages=[]
gender=None
age=None> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\Voices\Tokens\TTS_MS_EN-US_ZIRA_11.0
What am I missing?
TTS_MS_[locale]-[lang]_[voice name]_11.0
– Darryl