UWP Continuous speech get results

Paul Ryan 326 Reputation points
2020-11-02T18:58:13.89+00:00

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

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 the speech 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

Azure AI Speech
Azure AI Speech
An Azure service that integrates speech processing into apps and services.
1,774 questions
{count} votes

Accepted answer
  1. Ramr-msft 17,741 Reputation points
    2020-11-25T04:47:54.633+00:00

    @Paul Ryan Thanks for the details. The event Recognizing signals that an intermediate recognition result is received, The event Recognized signals that a final recognition result is received.

    Please follow the below document for Speech Recognizer events.

    https://learn.microsoft.com/en-us/dotnet/api/microsoft.cognitiveservices.speech.speechrecognizer?view=azure-dotnet

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.