本人做了个程序语音朗读功能,在本电脑上可以发音,可在别的电脑上不能发音,有的恩能够发音,可什么也听不清。请大神帮忙解决。
源代码: SpeechSynthesizer speaker = new SpeechSynthesizer();
speaker.SelectVoiceByHints(VoiceGender.Female, VoiceAge.Adult, 2, System.Globalization.CultureInfo.CurrentCulture);
speaker.Rate = -2;
speaker.Volume = 100;
strBoBao = “你好吗?”;
speaker.SpeakAsync(strBoBao);
源代码: SpeechSynthesizer speaker = new SpeechSynthesizer();
speaker.SelectVoiceByHints(VoiceGender.Female, VoiceAge.Adult, 2, System.Globalization.CultureInfo.CurrentCulture);
speaker.Rate = -2;
speaker.Volume = 100;
strBoBao = “你好吗?”;
speaker.SpeakAsync(strBoBao);
解决方案
20
SpeechSynthesizer synth = new SpeechSynthesizer(); // Configure the audio output. synth.SetOutputToDefaultAudioDevice(); // Speak a string. synth.Speak("每天回帖即可获得10分可用分");
这个是调用系统默认的语音引擎来播放声音。你可以试下。
20
貌似是语音包的问题,看看别的电脑装没装,或程序有没有打包进去。
http://www.cnblogs.com/daytoday/archive/2013/02/17/2914124.html
http://www.cnblogs.com/daytoday/archive/2013/02/17/2914124.html