I am using the System.Speech object in Windows 10 Powershell for a Text to Speech project, and I am trying to install new voices.
I installed new system voices by following these instructions:
On any edition of Windows 10, click Start > Settings, and then follow these steps:
Select the Start button, then select Settings > Time & Language > Region & Language.
Select Add a language and choose the language you want from the list. Only languages listed in the table below will have Text-to-Speech capabilities.
After the new language has been installed (this may take a few moments), select it in the Region & Language list, and then select Options.
Under Language options > Speech, select Download.
Restart your computer. The Text-to-Speech voices will be installed when your machine turns back on.
I can see these voices installed in settings and they also show up in the Windows 10 Text-to-Speech program. However, these voices don't show up when I run the GetInstalledVoices().VoiceInfo command in Powershell.
Is there some additional layer of setup I need to do to get System.Speech to recognize these new voices?
The problem lies in the first answer to this post: Windows 10 TTS voices not showing up?
Windows 10 has two different TTS engines installed by default. There are the WinRT speech synthesis APIs (in the Windows.Media.SpeechSynthesis namespace), and the SAPI speech synthesis APIs (in the System.Speech.Synthesis namespace, and the COM ISpVoice interface).
David and Zira are SAPI voices; the language packs install WinRT voices.
The SAPI APIs and voices are legacy APIs, and are not being further developed; all new voices and effort are going into the WinRT APIs and voices.
If you want to use the language pack voices, you'll need to move your application over to WinRT and use the WinRT APIs.
The System.Speech object only works with SAPI API voices. Luckily, Windows doesn't clearly document this fact anywhere, and you have to find it on a random stack overflow post you ran across by accident.