如何使用多个xml文件管理语法? [英] How to manage a grammar with multiple xml files?
本文介绍了如何使用多个xml文件管理语法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,
我有一个包含所有语法的大型xml文件。我想将此文件剪切为多个xml文件。我该怎么办?
I have a big xml file that contains all my grammar. I want to cut this file into multiple xml files. How should I do?
我使用kinect和语音识别。
I use kinect and voice recognition.
谢谢。
推荐答案
您好,
Hello,
我有一个大的xml文件,包含我的所有语法。我想将此文件剪切为多个xml文件。我该怎么办?
I have a big xml file that contains all my grammar. I want to cut this file into multiple xml files. How should I do?
RecognizerInfo ri = GetKinectRecognizer();
if (ri != null)
{
this.spRecEng = new SpeechRecognitionEngine(ri.Id);
using (var memoryStream = new MemoryStream(Encoding.ASCII.GetBytes(Properties.Resources.SpeechGrammar)))
{
var g = new Grammar(memoryStream);
spRecEng.LoadGrammar(g);
}
spRecEng.SpeechRecognized += spRecEng_SpeechRecognized;
spRecEng.SpeechRecognitionRejected += spRecEng_SpeechRecognitionRejected;
我使用kinect和语音识别。
I use kinect and voice recognition.
谢谢。
这篇关于如何使用多个xml文件管理语法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文