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解决思路
- 水晶报表-Exception of type 'System.OutOfMemoryException' was thrown.解决思路
- 水晶表格-Exception of type 'System.OutOfMemoryException' was thrown
- 水晶表格-Exception of type 'System.OutOfMemoryException' was thrown
- 未能加载文件或程序集“××××”或它的某一个依赖项。找到的程序集清单定义与程序集引用不匹配。 (错误来自 HRESULT:0x80131040)
- 导出Excel时出现Exception from HRESULT: 0x800A03EC的异常
- 还是这个有关问题 “找不到指定的模块。 (错误来自 HRESULT:0x8007007E)”
- 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. 磁盘空间不足,该如何解决
- asp.net给出异常的ORACLE exception
- 未能加载文件或程序集“AjaxControlToolkit”或它的某一个依赖项。磁盘空间不足。 (错误来自 HRESULT:0x80070070)
- —————未能加载文件或程序集“App_Code”或它的某一个依赖项。磁盘空间不足。(错误来自 HRESULT:0x80070070)
- throw new Exception("Message.")什么意思?该如何处理
- 未能加载文件或程序集“XXXXXXX”或它的某一个依赖项。另一个程序正在使用此文件,进程无法访问。 (错误来自 HRESULT:0x8007002
- 数不正确。 (错误来自 HRESULT:0x80070057 (E_INVALIDARG)) 页面错误了,高手帮忙
- 拒绝访问。 (错误来自 HRESULT:0x80030005 (STG_E_ACCESSDENIED))
- 查询的结果集里包含有特殊字符会造成timeout exception?解决思路
- 如何获取最后一个 Exception
- System.IO.FileLoadException: 需要强名称程序集。 (错误来自 HRESULT:0x80131044)
- 異常處理,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,该如何处理