在安裝了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
然後 問題解決 = =。