Continuous Recognition Async using mic

  • Thread starter Thread starter pryannow
  • Start date Start date
P

pryannow

Guest
Hi, I am looking at the sample programs for Speech to text using AZURE speech, using the mic

I am trying to figure out how to to the results,

When in recognizerRecognizing, I am trying to figure out when it completes and starts a new section.

IF it is short phrase everything works fine, it is when I the text is long that e.Result.Text starts a new section, I am trying to figure out when it starts a new section

try
{

await recognizer.StartContinuousRecognitionAsync();

recognizer.Recognizing += (s, e) =>
{
speechTempString += e.Result.Text;
speechString = e.Result.Text;
};

recognizer.Recognized += (s, e) =>
{
if (e.Result.Reason == ResultReason.RecognizedSpeech)
{
speechString = e.Result.Text;
speechTempString += e.Result.Text;
}
else if (e.Result.Reason == ResultReason.NoMatch)
{
Console.WriteLine($"NOMATCH: Speech could not be recognized.");
}
stringList.Add("nothing");
};

recognizer.SessionStopped += (s, e) =>
{

thanks

Continue reading...
 
Back
Top