Writing Grammars

This guide describes the procedures need to write, compile, test and deploy grammars, using the CPQD ASR library. You will find deployment details here that affect the development of grammars, as well as references to auxiliary documents. This guide also explains in detail how to use the auxiliary grammar tools that come with the CPQD speech recognition library.

This guide was compiled for developers that already have a certain amount of experience with writing and deploying grammars. This is not meant to be a quick start guide to the subject, nor a tutorial. Throughout the text, references to related documents relevant to the comprehension of the subject shall be provided, whenever deemed necessary.

The grammars accepted by the CPQD speech recognition library follow the W3C SRGS (Speech Recognition Grammar Specification) from March 16, 2004. This guide refers to this specification as the “SRGS specification”, or simply “the specification”, and the grammars written in conformity with this specification as “SRGS grammars”. The purpose of this grammar is not to explain the specification; knowing it is a prerequisite to the reading of the remainder of this document, and it is highly recommended that all readers access the W3C site to acquaint themselves with the constructions defined in the specification and their expected behaviors.