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;
详细解决方案
有关语音识别的有关问题Exception from HRESULT: 0x800455BC
热度:326 发布时间:2016-04-25 07:15:08.0
相关解决方案
- GWT 报错,能的请进: com.google.gwt.event.shared.UmbrellaException: Exception caught: Se
- null id in com.bsw.gms.hibernate.pojo.Score entry (don't flush the Session after an exception occurs,该怎么解决
- 急问:S60,eclipse,打开模拟器总是提示“unhandled exception.Close application?该如何解决
- 捕获异常(尽量别直接捕获System.Exception)
- 为什么基于对话框的程序出现了first-Chance exception in NTDLL.dll解决思路
- 未能加载文件或程序集“××××”或它的某一个依赖项。找到的程序集清单定义与程序集引用不匹配。 (错误来自 HRESULT:0x80131040)
- 导出Excel时出现Exception from HRESULT: 0x800A03EC的异常
- throw new Exception("不得为空");如何换行
- WINFORM 导出有关问题?80040154 没有注册类 (错误来自 HRESULT:0x80040154 (REGDB_E_CLASSNOTREG))
- Exception Details: System.IO.FileLoadException: Could not load file or assembly 'FreeTextBox' or one of its dependencies. 磁盘空间不足,该如何解决
- throw new Exception("Message.")什么意思?该如何处理
- 查询的结果集里包含有特殊字符会造成timeout exception?解决思路
- 如何获取最后一个 Exception
- 異常處理,catch(Exception ex)中的ex.Message怎樣在alert中調用到?解决思路
- sql体现超长(This SQL offer threw the timeout exception)
- exception specification list mismatch解决思路
- 关于First-chance exception in BREW_Simulator.exe (BREWAPP.DLL): 0xC0000005: Access Violation.的有关问题
- 关于MTK的错误(exception)分析
- Processor ARM79_0 raised an exception.Cause: Undefined instruction,该如何处理
- Servlet failed with Exception,java.lang.NullPointerException。求好手帮忙急
- Hibernate的错误net.sf.hibernate.PropertyAccessException: exception settin
- one hibernate SQL exception ?该如何处理
- Orge编译通过,弹出异常ORGE EXCEPTION(6.)
- [求助]unreporter exception java.text.ParseException;must be caught or ...
- DONE新学JSP,在书上抄的第一个程序,type Exception!
- exception in thread "main" java.lang.NoSuchMethodError:main
- [求助]org/hibernate/exception/DataException
- PHPExcel的exception 'Exception' with message 'The filename is not recognised as an OLE file有关问题解决
- Could not open the editor: An unexpected exception was thrown 异常
- 解决WebLogic启动时BEA-171522错误(启动时报classcast exception)