Windows Phone 官方示例学习:Short message dictation and web search grammars sample(语音识别,文字语音)
2013-04-14 22:07
861 查看
在windows phone8中语音可以理解为三部分功能即: 语音控制 voice commands, 语音识别 speech recognition, 文字语音 text-to-speech (TTS)。
示例演示如何使用预定义的短消息和网络搜索语法的基础知识与语音识别功能。
代码下载:http://code.msdn.microsoft.com/wpapps/Short-message-dictation-594c8a0a
相关文章:/article/5101844.html
语音识别 speech recognition 示例代码
文字语音 text-to-speech (TTS) 示例代码
示例演示如何使用预定义的短消息和网络搜索语法的基础知识与语音识别功能。
代码下载:http://code.msdn.microsoft.com/wpapps/Short-message-dictation-594c8a0a
相关文章:/article/5101844.html
语音识别 speech recognition 示例代码
SpeechRecognizerUI recoWithUI = new SpeechRecognizerUI(); SpeechRecognitionUIResult recoResult; string LuangeStr = "zh-CN";//"fr-FR"; try { // Query for a recognizer that recognizes French as spoken in France. IEnumerable<SpeechRecognizerInformation> frenchRecognizers = from recognizerInfo in InstalledSpeechRecognizers.All where recognizerInfo.Language == LuangeStr select recognizerInfo; // Set the recognizer to the top entry in the query result. recoWithUI.Recognizer.SetRecognizer(frenchRecognizers.ElementAt(0)); // Create a string array of China numbers. string[] nombres = { "一", "二", "三", "四", "五", "六", "七", "八", "九", "十" }; //string[] nombres = { "un", "deux", "trois", "quatre", "cinq", "six", "sept", "huit", "neuf", "dix" }; // Create a list grammar from the string array and add it to the grammar set. recoWithUI.Recognizer.Grammars.AddGrammarFromList("ChinaNumbers", nombres); //recoWithUI.Recognizer.Grammars.AddGrammarFromList("French", nombres); // Display text to prompt the user's input. recoWithUI.Settings.ListenText = "Say a China number"; //Dire un nombre // Give an example of ideal speech input. recoWithUI.Settings.ExampleText = "'一', '二', '三', '四' "; // Load the grammar set and start recognition. recoResult = await recoWithUI.RecognizeWithUIAsync(); if (recoResult.ResultStatus == SpeechRecognitionUIStatus.Succeeded) { // Output the speech recognition result. txtDictationResult.Text = "You said: " + recoResult.RecognitionResult.Text; } } catch (Exception ex) { MessageBox.Show(ex.Message); }
文字语音 text-to-speech (TTS) 示例代码
// Initialize a new instance of the SpeechSynthesizer. SpeechSynthesizer synth = new SpeechSynthesizer(); var voices1 = (from voice in InstalledVoices.All where voice.Language == "zh-CN" //&& voice.Gender==VoiceGender.Male select voice); if (voices1 != null) synth.SetVoice(voices1.ElementAt(1)); await synth.SpeakTextAsync("本期销售2500辆汽车,已超额完成指标"); //"French (France)", "fr-FR" // 读法语 var voices = (from voice in InstalledVoices.All where voice.Language == "fr-FR" //&& voice.Gender==VoiceGender.Male select voice); // Set the voice as identified by the query. if (voices != null) synth.SetVoice(voices.ElementAt(0)); await synth.SpeakTextAsync("Bonjour,Tu es libre ce soir?");
启动 Windows Phone 8 的语音识别
http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj206963(v=vs.105).aspx处理 Windows Phone 语音应用中的错误
http://msdn.microsoft.com/zh-cn/library/windowsphone/develop/jj662934(v=vs.105).aspx相关文章推荐
- Windows Phone 官方示例学习:Background Transfer Service Sample(后台传输)
- 学习官方示例 - TApplication.OnMessage
- 语音识别 Search and Decoding 总结
- c#字符串截取文字省略[WEB学习示例]
- 请问如何动态实现播放语音文件[WEB学习示例]
- Swift教程_通过改造官方Sample学习Swift(一)_Element示例简介
- 学习官方示例 - TApplication.OnShowHint
- 应用示例:图像文字识别
- 学习官方示例 - System.Assigned
- Web前端学习第十天·fighting_使用CSS美化文字(三)
- Web Mining and Big Data 公开课学习笔记 ---lecture0
- 避开Google Voice Search利用Google Speech API实现Android语音识别
- ElasticSearch入门学习-基础示例(1)
- 【干货】扫描识别控件Dynamic Web TWAIN在线示例汇总
- 编译CTPN、crnn、sceneReco深度学习图片文字定位识别遇到的坑
- 在学习写微信小程序的同学注意了,别给官方扯蛋的示例给坑了!
- 学习官方示例 - TApplication.OnDeactivate
- 【文字识别】百度AI之运行IOS示例(Demo)工程总结
- 深度学习文字识别论文综述
- 【CNTK】CNTK学习笔记之图像识别-树叶识别Train and Test