当前位置:编程学习 > wap >>

有关语音识别的问题Exception from HRESULT: 0x800455BC

                                string smsText = string.Empty;
                                SpeechRecognizerUI recognizer = new SpeechRecognizerUI();
                                IAsyncOperation<SpeechRecognitionUIResult> recoOperation;
                                IEnumerable<SpeechRecognizerInformation> chineseRecognizers = from recognizerInfo in InstalledSpeechRecognizers.All
                                                                                              where recognizerInfo.Language =="zh-CN"
                                                                                              select recognizerInfo;
                                recognizer.Recognizer.SetRecognizer(chineseRecognizers.ElementAt(0));
                                //recognizer.Recognizer.Grammars.AddGrammarFromPredefinedType("dictation", SpeechPredefinedGrammar.Dictation);
                                await voice.SpeakTextAsync("请说出短信内容");
                                try
                                {
                                    recoOperation = recognizer.RecognizeWithUIAsync();
                                    var recoResult = await recoOperation;
                                    if ((int)recoResult.RecognitionResult.TextConfidence < (int)SpeechRecognitionConfidence.Medium)
                                    {
                                        await voice.SpeakTextAsync("说话声音太小");
                                        return;
                                    }
                                    else 
                                    {
                                        smsText = recoResult.RecognitionResult.Text;
                                    }

运行过程中会出现 --------------------编程问答-------------------- 帮顶哦 --------------------编程问答--------------------
引用 1 楼 xarandy 的回复:
帮顶哦
你也遇到了这样的问题? --------------------编程问答-------------------- 你能一步步调试吗? --------------------编程问答--------------------
引用 3 楼 cuit 的回复:
你能一步步调试吗?
调试到这里(“ var recoResult = await recoOperation;”)的时候报错
补充:移动开发 ,  Windows Phone
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,