Partilhar via


Grammar Libraries for French (Canada)

  Microsoft Speech Technologies Homepage

The Microsoft Speech Application SDK Version 1.1 (SASDK) includes two grammar libraries:

The grammar libraries are the primary grammar resources used by ASP.NET Application Speech Controls.

Contents

Each library contains a number of rules that the recognition engine uses to recognize either voice or DTMF input. When an application uses one of the libraries, all of the rules in that library are loaded into the recognition engine as inactive. No recognition output for a rule is returned unless the application activates the rule prior to using it. A specific rule is activated by adding a ruleref element that references the rule.

The documentation pages in this topic illustrate the XML markup that is required to activate the rules in the libraries, and provide example inputs and their corresponding SML output. In this topic, the rules contained in the voice mode grammar library are organized into rulesets according to the type of data that the rules recognize. For example, the rules that recognize credit card information belong to the CreditCard ruleset.

File Formats

The SASDK installer installs the grammar libraries in two file formats:

  • cmnrules.grxml and dtmfrules.grxml are XML-formatted files that can be easily read by Web authors.
  • cmnrules.cfg and dtmfrules.cfg are compiled binary versions of the libraries and are intended to be read only by a computer.

Run Time

Speech-enabled Web applications use the run-time format of the libraries installed on the Web server hosting the application. The run-time format of the library files is CFG binary. The .cfg versions of the library files are located in:

%SystemDrive%\Inetpub\wwwroot\aspnet_speech\v1_1_xxxxx_y\client_script\3084\src\

The Speech Application Platform loads and caches the run-time format of a library file the first time an application references it.

Design Time

Developers of speech-enabled Web applications have access to the XML-formatted library files. These files are located in:

%ProgramFiles%\Microsoft Speech Application SDK 1.1\SpeechControls\v1_1_xxxxx_y\3084\src\

The XML-formatted version of each library file was the input file for the Grammar Compiler (SrGSGc.exe) that produced the corresponding run-time .cfg version of the file described previously.

Developers can extract rules from the XML library file for use in new grammars that they are building, or they can modify the grammar library files.

Remarks

  • Modifying the XML-formatted .grxml files is not recommended. If modification is necessary, copy the .grxml file to a new file (for example, myRules.grxml) and modify the new file.
  • Overwriting the run-time.cfg files is not recommended. Modifications to these files may break functionality of Application Speech Controls. When creating and compiling a modified grammar file based on either cmnrules.grxml or dtmfrules.grxml, name the binary output file something other than cmnrules.cfg or dtmfrules.cfg (for example, myRules.cfg).
  • Additional information and updates to the Grammar Libraries documentation can be found at the Microsoft Speech Server Product Updates page.