0 Replies - 533 Views - Last Post: 09 November 2009 - 08:11 AM Rate Topic: -----

#1 nadunx  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 20
  • Joined: 13-September 09

Speech Recognizer Grammers and Choices usage

Post icon  Posted 09 November 2009 - 08:11 AM

I'm trying to learn the speech API in windows 7. I found sample code written about 3 yrs ago on how to use these API s . and in that code I found the following line which tags a specific choice, when adding it the the grammer builder object

//build the core set of choices
	Choices sizes = new Choices("small", "regular", "large");

//Intialize Grammer builder object
	GrammarBuilder myBuilder = new GrammarBuilder();
	myBuilder.AppendChoices(sizes, "size");

I found that in .net 3.5 ( which is the version I use with VS 2008 ) there is no such funtion calle AppendChoices in the GrammerBuilder class. instead it has the Append method. But it doesnt take two arguments as in the example ( the choice object and a key value ).

what i need to do is to tag the specific choice as in the code. This really helps to get the recognized / semantic values in the speech_recognized event in the grammer class . heres how it is used in the code.

StringBuilder sb = new StringBuilder();

Could you please let me know how to archive this in .net 3.5 . I really think the tagging is very efficent when it comes to identifying the keywords recognized. otherwise I'll have to check the whole recognized phrase for the desired keyword. which is bad for a long phrase.


Is This A Good Question/Topic? 0
  • +

Page 1 of 1