hello friends,
I am new to this website. I am working in speech recognition. my problem is I want to find the confidence score of phrase and all of its alternates. but I am getting same confidence score for all the alternates. so can someone please help me with this.
my code is as under if you want.
public void RecoContext_Recognition(int StreamNumber, object StreamPosition, SpeechRecognitionType RecognitionType, ISpeechRecoResult Result)
{
strData = Result.PhraseInfo.GetText(0, -1,
true);
for (int i = 0; i < Result.PhraseInfo.Elements.Count; i++)
{
listView1.Items.Insert(0,Result.PhraseInfo.GetText(i, 1,
true));
listView1.Items.Insert(1, Result.PhraseInfo.Elements.Item(i).ActualConfidence.ToString());
listView1.Items.Insert(2,Result.PhraseInfo.Elements.Item(i).EngineConfidence.ToString());
listBox1.Items.Add(Result.PhraseInfo.GetText(i, 1,
true) + " | " + Result.PhraseInfo.Elements.Item(i).ActualConfidence + " | " + listBox1.Items.Add(Result.PhraseInfo.Elements.Item(i).EngineConfidence));
PhraseAlts = Result.Alternates(3, i, 1);
for(int altcount=0;altcount<PhraseAlts.Count;altcount++)
{
listBox2.Items.Add(
"alt-" + altcount + " : " + PhraseAlts.Item(altcount).PhraseInfo.GetText(altcount, 1, true) + " | " + PhraseAlts.Item(altcount).PhraseInfo.Elements.Item(altcount).ActualConfidence + " | " + PhraseAlts.Item(altcount).PhraseInfo.Elements.Item(altcount).EngineConfidence);
}
}
textBox1.Text = textBox1.Text +
" " + strData;
}
}
}
thanks,
-hardik