Is there any way to tell if the input was speech or DTMF? RRS feed

  • Question

  • I have a QuestionAnswerActivity with a speech grammar and a DTMF grammar.  When the activity is done, I would like to know if the input recognized was speech or DTMF. 


    Is there any way to do this? 

    Wednesday, June 13, 2007 9:37 PM


  • One way to do this is to wire up event handlers for the Grammar.Recognized event.  The event handlers could set the value of a boolean property, e.g. bool isSpeechGrammar, depending on if it is an event handler for the speech grammar(s) or the DTMF grammar(s).


    Another way to do this is to author the grammars so that they return the grammar type in the SrgsSemanticInterpretationTag, and then access the semantic data in QuestionAnswerActivity.RecognitionResult.Semantics

    Thursday, June 14, 2007 2:27 AM