Click here to Skip to main content
15,890,897 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
This refers to the DTMF Recognition Engine that is part of the Microsoft Speech Recognition Engine V11 package.

After much head scratching I managed to get the engine to recognize the first tone that I added using the AddTone((byte)tone) (regardless of how many tones I add).

If I send a series of audio tones it only returns the one that I added to the engine first.

Example 1: I add all the tones from 0 to 9 using AddTone((byte)tone);
I send an audio stream containing a series of DTMF tones from 0 to 9.
The engine returns 0 only.

Example 2: I add all the tones from 9 to 0 using AddTone((byte)tone);
I send the same audio stream containing a series of DTMF tones from 0 to 9.
The engine returns 9 only.

What am I missing?
Posted

What grammar did you load?

AddTone() is used add tones to be recognized against the current grammar.
 
Share this answer
 
Here is the grammar, copied from MSDN.  I'm afraid the online help doesn't explain how this is supposed to work.  

I am guessing (I know, bad idea) that a queue of tones will create a container full of results.  If so, where is the container?



<grammar mode="dtmf" root="digit" version="1.0">
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
         xsi:schemaLocation="http://www.w3.org/2001/06/grammar 
                             http://www.w3.org/TR/speech-grammar/grammar.xsd"
         xmlns="http://www.w3.org/2001/06/grammar">

<rule id="digit">
 <one-of>
   <item> 0 </item>
   <item> 1 </item>
   <item> 2 </item>
   <item> 3 </item>
   <item> 4 </item>
   <item> 5 </item>
   <item> 6 </item>
   <item> 7 </item>
   <item> 8 </item>
   <item> 9 </item>
 </one-of>
</rule>

<rule id="pin" scope="public">
 <one-of>
   <item>
     <item repeat="4"><ruleref uri="#digit" /></item>
     #
   </item>
   <item>
     * 9
   </item>
 </one-of>
</rule>

</grammar>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900