,在windows服务中使用SpVoice为何没有声音
求助,在windows服务中使用SpVoice为何没有声音?
在windows服务中使用SpVoice无法进行语音合成,有经验的帮忙看下哦!
在form中正常,在服务中没有声音
SpeechVoiceSpeakFlags SpFlags = SpeechVoiceSpeakFlags.SVSFlagsAsync;
SpVoice Voice = new SpVoice();
Voice.Speak("测试声音", SpFlags);
------解决思路----------------------
用这个是放不出声音的,用这个
string soundfile = System.Environment.CurrentDirectory + @"\jingbao.wav";
if (File.Exists(soundfile))
{
System.Media.SoundPlayer _Sound = new System.Media.SoundPlayer(soundfile);
_Sound.Play();
}
------解决思路----------------------
http://blog.****.net/zgke/article/details/5761140
在windows服务中使用SpVoice无法进行语音合成,有经验的帮忙看下哦!
在form中正常,在服务中没有声音
SpeechVoiceSpeakFlags SpFlags = SpeechVoiceSpeakFlags.SVSFlagsAsync;
SpVoice Voice = new SpVoice();
Voice.Speak("测试声音", SpFlags);
------解决思路----------------------
用这个是放不出声音的,用这个
string soundfile = System.Environment.CurrentDirectory + @"\jingbao.wav";
if (File.Exists(soundfile))
{
System.Media.SoundPlayer _Sound = new System.Media.SoundPlayer(soundfile);
_Sound.Play();
}
------解决思路----------------------
http://blog.****.net/zgke/article/details/5761140