我正在努力讓人類像波斯語言的字典(db),所以我試圖說話並讓C#在語音上產生它,但問題是我無法找到任何事件來查找我說了什麼。例如,我們有SpeechRecognized
事件,但是在識別語音後它被解僱了。這裏是我的代碼示例:C#返回語音拼音而不識別它
<pre>
<code>
SpeechRecognizer rec = new SpeechRecognizer();
public Form1(){
InitializeComponent();
rec.SpeechRecognized += rec_SpeechRecognized(rec_SpeechRecognized); // this will fire after recognize
rec.SpeechDetected +=new EventHandler(rec_SpeechDetected); // this will fired each time but with no return
rec.enabled = true;
}
</code>
<pre>
注: 我想C#生產什麼,我說的音值,不承認它。
看到什麼SpeechDetected或SpeechHypothesized事件? – Holystream 2011-05-19 19:47:45
SpeechDetected不會返回任何結果。只是包含時間! SpeechHypothesized與SpeechRecognized相同。 – ShirazITCo 2011-05-19 19:53:13