Microsoft Speech Tech (en)
 

Dictation in a context-free grammar


 
Dictation in a context-free grammar Post Reply
28.04.2008 09:13 Rick

Greetings,

I am trying to assemble a fairly simple grammar (see XML below) for speech
recognition, and the format of my grammar is as follows:

"order sell [quantity] at [price]"          (or)
"order pay [price] on [quantity]"

Where quantity is some integer value and price is some floating-point value.
In each possibility there are two "dictation" elements where I rely on the
SAPI dictation engine to decipher the numbers in this case.

I would *like* the engine to normalize these dictation elements, so that if
I say "three hundred and nineteen" or "three point four" it will
automatically normalize the text into 319 and 3.4, respectively.  The SAPI
engine *will* do this if I simply load a grammar and call DictationLoad or
DictationSetState = Active, however if I have Dictation rules embedded within
a context-free grammar I'm defining, it will not do this text
replacement/normalization.

So if I say:

"order sell three hundred and nineteen at forty five point five"

that's exactly what I get -- the numbers are all spelled out.  What I want is:

"order sell 319 at 45.5"

How can I get the reco engine to perform this normalization *within* my
grammar at these dictation points?

Thanks,
Rick

My grammar:


  
    order
    
  

  
  
    
      sell
      
      at
      
    


    
      pay
      
      on
      
    
  

  
  
    
  

  
    
  


 
 
 Write Us|  Add to favorites
 
 
 ©2007 TERASENS GmbH. All rights reserved. Copyright Notice