在安装了MicroSoft Speech SDK V11 写了一个简单的例子想测试一下TTS好用不 ,如下:
SpeechSynthesizer synth = new SpeechSynthesizer();
synth.SelectVoice("Microsoft Server Speech Text to Speech Voice (zh-CN, HuiHui)");
synth.SetOutputToWaveFile("output.wav");
synth.Speak("一个大坑");
结果报 Speak error '80004005' 错误,但是用英文转语音的时候却没有问题。
谷歌了一下,找到 https://stackoverflow.com/questions/27394304/tts-for-chinese-is-throwing-sapi-error-e-fail 原因。
原因是缺少了 chsbrkr.dll 、 chtbrkr.dll 这两个文件....
下载相应的dll 放到
64位:C:\Program Files\Common Files\Microsoft Shared\Speech\TTS\v11.0
然后 问题解决 = =。