Does anyone have any experience with HMIHY conversational grammars?
The following code is from a Microsoft example but I don't see how to set a name for the DTMF part of a HMIHY grammar. The test for "KC_ReportPayment" is supposedly testing for the DTMF value (1 in this case) but I don't seem to find a place to assign the "KC_ReportPayment" to the DTMF value of 1.
The test shown below for DTMF fails.
Though when I use DTMF the else if part will return true so things will work.
I'm wondering if this is just a deprecated way of doing this.
private void reportPayment(object sender,
ConditionalEventArgs e)
{
// Test for a DTMF match.
if (routeCall.RecognitionResult.
Semantics.ContainsKey("KC_ReportPayment"))
{
e.Result = true;
}
// Test for a speech match.
else if (routeCall.RecognitionResult.
Semantics.ContainsKey("HMIHY")
&&
routeCall.RecognitionResult.
Semantics["HMIHY"].Value.ToString().
Equals("ReportPayment"))
{
e.Result = true;
}
// No match.
else
{
e.Result = false;
}
}