如何让Microsoft DTMF识别器引擎返回多个音调? [英] How do I get Microsoft DTMF Recognizer engine to return more than one tone?

查看:79
本文介绍了如何让Microsoft DTMF识别器引擎返回多个音调?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是指DTMF识别引擎,它是Microsoft语音识别引擎V11软件包的一部分。



经过多次努力,我设法让引擎识别我使用AddTone((字节)音调添加的第一个音调)(无论我添加了多少音调)。



如果我发送一系列音频,它只会返回我首先添加到引擎中的音频。



示例1:我使用AddTone((byte)tone)添加0到9之间的所有音调;

我发送一个包含从0到9的一系列DTMF音调的音频流。

引擎仅返回0。



示例2:我使用AddTone((byte)tone)将所有音调从9添加到0;

我发送包含从0到9的一系列DTMF音调的相同音频流。

引擎仅返回9.



我缺少什么?

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?

推荐答案

你加载了什么语法?



AddTone ()使用添加音调来识别当前语法。
What grammar did you load?

AddTone() is used add tones to be recognized against the current grammar.


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>


这篇关于如何让Microsoft DTMF识别器引擎返回多个音调?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆