1

I just followed the MSDN Installation, installed the "MSSpeech_TTS_zh-CN_HuiHui.msi" & "MSSpeech_SR_zh-CN_TELE.msi", and ran the Sample, English voice works well, but when I type Chinese like:

SpeechSynthesizer synth = new SpeechSynthesizer();
synth.SelectVoiceByHints(VoiceGender.Neutral);
synth.Speak("你好");

it don't speak any thing, any suggustion? Thanks!

Kamil
  • 594
  • 1
  • 8
  • 28
  • I can not get Chinese working with the v11.0 SDK and HuiHui installed. Every other language works except for Chinese. It doesn't say anything at all. Any ideas for me? – egfconnor Sep 21 '15 at 18:09

1 Answers1

0

You may want to select the voice explicitly, looking at the MSDN documentation on SelectVoiceByHints it states that it will return the first voice that matches your specifications.

From Link(emphasis mine).

Use the GetInstalledVoices method and VoiceInfo class to obtain the names of installed text-to-speech (TTS) voices that you can select.The SpeechSynthesizer object selects the first installed voice that matches the specified characteristics.

When an application calls GetInstalledVoices, the method verifies that each of the voices it finds in the registry meets certain minimum criteria. For any voice that fails verification, GetInstalledVoices sets its Enabled property to False. An application cannot select a voice whose Enabled property is False. Typically, applications will not set a voice’s Enabled property.

To select a voice by name, use the SelectVoice method

or you can use the Overload of the SelectVoiceByHints Method that takes CultureInfo as a parameter.

The SpeechSynthesizer object finds voices whose Gender, Age, and Culture properties match the gender, age, and culture parameters. The SpeechSynthesizer counts the matches it finds, and returns the voice when the count equals the voiceAlternate parameter.

Microsoft Windows and the System.Speech API accept all valid language-country codes. To perform text-to-speech using the language specified in the culture parameter, a speech synthesis engine that supports that language-country code must be installed. The speech synthesis engines that shipped with Microsoft Windows 7 work with the following language-country codes:

•en-US. English (United States)

•zh-CN. Chinese (China)

•zh-TW. Chinese (Taiwan)

Two-letter language codes such as "en" are also permitted.

Mark Hall
  • 53,938
  • 9
  • 94
  • 111
  • 1
    GetInstalledVoices() only return one "Microsoft Anna" voice, but I double checked that I have installed "MSSpeech_TTS_zh-CN_HuiHui.msi". – Kamil Jul 02 '14 at 06:04
  • I also checked [This question](http://stackoverflow.com/questions/3208617/speechsynthesizer-doesnt-get-all-installed-voices?rq=1) but problem still remain, btw, I am win7 64bit, vs2010 – Kamil Jul 02 '14 at 06:36
  • 1
    After I checked [This Article's source code](http://www.codeproject.com/Articles/206033/My-PC-can-speaks-and-understand-languages-Do-yo), I found it is needed change the using System.Speech.Synthesis; to using Microsoft.Speech.Synthesis; and then, it works well. The diffrenece between these two has been disscussed [Here](http://stackoverflow.com/questions/17577866/microsoft-speech-synthesis-does-not-work-for-text-to-speech-but-system-speech-sy?rq=1). I will supply more information/reseaon after I do more research. Thanks! – Kamil Jul 02 '14 at 08:19
  • You can check [This Post](http://stackoverflow.com/questions/17577866/microsoft-speech-synthesis-does-not-work-for-text-to-speech-but-system-speech-sy), also refer to this question. – Kamil Jul 03 '14 at 02:32