簡體   English   中英

如果語音識別語言設置為英語-美國以外的其他任何語言,則程序不會加載

[英]Program does not load if Speech Recognition Language is set to anything other than English - US

我已經在程序中添加了語音識別功能。 但是,如果我嘗試運行該程序,並且“語音屬性”中的語言設置為“用於Windows的Microsoft Speech Recognizer 8.0(英語-美國)”以外的其他語言,則該程序無法加載。

我想擁有它,以便無論選擇哪種語言,程序都將加載。

我的語音命令的代碼如下:

vcstat.Text = "Voice Control Enabled";
            recognizer = new SpeechRecognizer();
            recognizer.SpeechDetected += recognizer_SpeechDetected;
            recognizer.SpeechRecognitionRejected += recognizer_SpeechRecognitionRejected;
            recognizer.SpeechRecognized += recognizer_SpeechRecognized;  
        GrammarBuilder grammar = new GrammarBuilder();
            grammar.Append(new Choices("Cut", "Copy", "Paste", "Select All Text", "Print", "Unselect All Text", "Delete", "Save", "Save As", "Open", "New", "Close Basic Word Processor"));
            recognizer.LoadGrammar(new Grammar(grammar));

還有更多代碼,但這與實際命令有關,因此我認為沒有必要在此處發布。

如果有人可以幫助我找出允許程序啟動的方法,而不管使用的是語音識別引擎,我將不勝感激。

如果客戶端計算機上為支持的一種語言安裝了MUI語言包,則只能使用其他語言的語音識別。

http://answers.microsoft.com/zh-CN/windows/forum/windows_7-windows_programs/windows-7-speech-recognition-language-selection/0a859099-a76d-4799-abe9-847997399927

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM