Newbie: Speech to Text SDK vs Rest

dpaul 31 Reputation points
2022-01-31T17:05:45.617+00:00

Hi
I just started learning Azure and speech services. I built a small tutorial console app (code below). The tutorial had me download Nuget package Microsoft.CognitiveServices.Speech.

Question: I assume I am using the Speech to Text SDK? Or is the code below making Rest API calls under the covers and I am actually using Rest Api's?

       private static async Task RecognizeSpeech()
        {
            var configuration = SpeechConfig.FromSubscription"abc""eastus");
            using (var recog = new SpeechRecognizer(configuration))
            {
                Console.WriteLine("Start Speaking...");
                var result = await recog.RecognizeOnceAsync();
                if (result.Reason == ResultReason.RecognizedSpeech)
                {
                    Console.WriteLine(result.Text);
                }
            }

        }

Thanks in advance!

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

Accepted answer
  1. YutongTie-MSFT 47,676 Reputation points
    2022-01-31T19:47:30.673+00:00

    @dpaul

    Yes, you are right, you are using Speech SDK code sample for C#.

    For more reference, please check below code repo and code samples:

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

    https://github.com/Azure-Samples/cognitive-services-speech-sdk/blob/master/quickstart/csharp/dotnet/from-microphone/helloworld/Program.cs

    Hope this helps!

    Please kindly accept the answer if you feel this is helpful! Thank you.

    Regards,
    Yutong


0 additional answers

Sort by: Most helpful