Frequently Asked Questions

Flat
What is a Grammar?
User: kmaclean
Date: 1/1/2010 11:48 am
Views: 13783
Rating: 0

A Speech Recognition Grammar sets out all the acceptable words and phrases that a user might say at a particular point in a dialog with a Speech Recognition System.  A Grammar file is used in Desktop Command & Control or Telephony IVR (Interactive Voice Response) Speech Recognition applications.

A simple grammar (in HTK format) might look like the following:

$name = [ STEVE ] YOUNG| [JOHN] DOE;
( START (PHONE|CALL) $name) END )

Basically this tells the Speech Recognition Engine to recognize the following utterances (note that the vertical bar in the grammar denotes 'or', and the contents of a set of square brackets indicates an optional utterance):

  • PHONE YOUNG
  • PHONE STEVE YOUNG
  • PHONE DOE
  • PHONE JOHN DOE
  • CALL YOUNG
  • CALL STEVE YOUNG
  • CALL DOE
  • CALL JOHN DOE

Any other utterance is ignored by the Speech Recognition Engine, which usually returns an 'out of grammar' error.  So the following utterances would be rejected by the Speech Recognition Engine:

  • PHONE STEVE 
  • CALL JOHN
  • PHONE STEVE DOE
  • CALL JOHN YOUNG
  • WHAT TIME IS IT?
  • ...

For additional information, see these links: 

PreviousNext