close
阿拉伯文翻譯
以下文章來自: http://einboch.pixnet.net/blog/post/267347720-c%23%e7%9a%84%e6%96%87%e5%ad%97%e8%bd%89%e8%aa%9e%e9%9有關各國語文翻譯公證的問題歡迎諮詢華頓翻譯公司02-77260932
private void button2_Click(object sender翻譯社 EventArgs e) { SpVoiceClass voice = new SpVoiceClass(); voice.Voice = voice.GetVoices(string.Empty, string.Empty).Item(0);//Item(0)中文女聲 voice.Speak("接待來到文字轉語音系統", SpeechVoiceSpeakFlags.SVSFDefault); System.Threading.Thread.Sleep(3000); voice.Speak("注意,SPC跨越鑒戒值上限", SpeechVoiceSpeakFlags.SVSFDefault); System.Threading.Thread.Sleep(3000); voice.Speak("正告,SPC超過規格上限", SpeechVoiceSpeakFlags.SVSFDefault); }
文章標籤
C#
text-to-speech
文字轉語音
插足參考
在COM元件中選擇Microsoft Speech Object Library 5.4
private void button1_Click(object sender, EventArgs e) { SpVoiceClass voice = new SpVoiceClass(); voice.Voice = voice.GetVoices(string.Empty, string.Empty).Item(2);//Item(2)女聲 voice.Speak("Welcome to text to speech system."翻譯社 SpeechVoiceSpeakFlags.SVSFDefault);//SVSFDefault: Specifies that the default settings System.Threading.Thread.Sleep(3000); voice.Speak("Warning, SPC chart is out of upper control limit!", SpeechVoiceSpeakFlags.SVSFDefault); System.Threading.Thread.Sleep(3000); voice.Speak("Alarm翻譯社 SPC chart is out of upper spec limit!", SpeechVoiceSpeakFlags.SVSFDefault); }
利用三:
到場定名空間:
2.說明:
有關Microsoft Speech API的申明請參考MSDN:
http://msdn.microsoft.com/en-us/library/ee125663(v=vs.85).aspx
在很多的工場運用中,常需要利用文字轉語音的體式格局提示操作人員或是工程師領會目前生產狀態,警報或是即時訊息的通知,使用微軟供應的Speech API,可以很輕鬆完成此項程式開辟利用翻譯
using SpeechLib;
運用一:
1.媒介:
private void Form1_Load(object sender翻譯社 EventArgs e) { SpVoiceClass voice = new SpVoiceClass(); voice.Voice = voice.GetVoices(string.Empty翻譯社 string.Empty).Item(1);//Item(1)男聲 voice.Speak("You got e-mail", SpeechVoiceSpeakFlags.SVSFlagsAsync);//SVSFlagsAsync: Specifies that the Speak call should be asynchronous. That is, it will return immediately after the speak request is queued. }
應用二:
以下文章來自: http://einboch.pixnet.net/blog/post/267347720-c%23%e7%9a%84%e6%96%87%e5%ad%97%e8%bd%89%e8%aa%9e%e9%9有關各國語文翻譯公證的問題歡迎諮詢華頓翻譯公司02-77260932
全站熱搜
留言列表