World Library  
Flag as Inappropriate
Email this Article

Speech Recognition Grammar Specification

Article Id: WHEBN0002144488
Reproduction Date:

Title: Speech Recognition Grammar Specification  
Author: World Heritage Encyclopedia
Language: English
Subject: Speech Synthesis Markup Language, World Wide Web Consortium, Internationalization Tag Set, SMIL Timesheets, Hypertext Application Language
Collection: World Wide Web Consortium Standards, Xml-Based Standards
Publisher: World Heritage Encyclopedia
Publication
Date:
 

Speech Recognition Grammar Specification

Speech Recognition Grammar Specification (SRGS) is a W3C standard for how speech recognition grammars are specified. A speech recognition grammar is a set of word patterns, and tells a speech recognition system what to expect a human to say. For instance, if you call an auto attendant application, it will prompt you for the name of a person (with the expectation that your call will be transferred to that person's phone). It will then start up a speech recognizer, giving it a speech recognition grammar. This grammar contains the names of the people in the auto attendant's directory and a collection of sentence patterns that are the typical responses from callers to the prompt.

SRGS specifies two alternate but equivalent syntaxes, one based on XML, and one using Augmented BNF format. In practice, the XML syntax is used more frequently.

Both the ABNF Form and XML Form have the expressive power of a Context Free Grammar. A grammar processor that does not support recursive grammars has the expressive power of a Finite State Machine or regular expression language.

If the speech recognizer returned just a string containing the actual words spoken by the user, the voice application would have to do the tedious job of extracting the semantic meaning from those words. For this reason, SRGS grammars can be decorated with tag elements, which when executed, build up the semantic result. SRGS does not specify the contents of the tag elements: this is done in a companion W3C standard, Semantic Interpretation for Speech Recognition (SISR). SISR is based on ECMAScript, and ECMAScript statements inside the SRGS tags build up an ECMAScript semantic result object that is easy for the voice application to process.

Both SRGS and SISR are W3C Recommendations, the final stage of the W3C standards track. The W3C VoiceXML standard, which defines how voice dialogs are specified, depends heavily on SRGS and SISR.

Examples

Here is an example of the Augmented BNF form of SRGS, as it could be used in an auto attendant application:

#ABNF 1.0 ISO-8859-1;

// Default grammar language is US English
language en-US;

// Single language attachment to tokens
// Note that "fr-CA" (Canadian French) is applied to only
//  the word "oui" because of precedence rules
$yes = yes | oui!fr-CA;

// Single language attachment to an expansion
$people1 = (Michel Tremblay | André Roy)!fr-CA;

// Handling language-specific pronunciations of the same word
// A capable speech recognizer will listen for Mexican Spanish and
//   US English pronunciations.
$people2 = Jose!en-US | Jose!es-MX;

/**
 * Multi-lingual input possible
 * @example may I speak to André Roy
 * @example may I speak to Jose
 */
public $request = may I speak to ($people1 | $people2);

Here is the same SRGS example, using the XML form:



  


  
  
  
    
      yes
      oui
    
   
  
  
  
    
      Michel Tremblay
      André Roy
    
  
  
  
  
    
      Jose
      Jose
    
  
  
  
  
     may I speak to André Roy 
     may I speak to Jose 
  
    may I speak to
    
        
        
    
  

See also

External links

  • SRGS Specification (W3C Recommendation)
  • SISR Specification (W3C Recommendation)
  • VoiceXML Forum
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and USA.gov, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for USA.gov and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
 
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
 
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.
 


Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.