This example assumes using Deepgram; is in scope and apiKey contains your Deepgram API key.
1 2 3 4 5 6 7 8 910111213141516
usingvarclient=newDeepgramClient(apiKey);ISpeechToTextClientspeechClient=client;// Transcribe audio using the MEAI ISpeechToTextClient interface.// Deepgram requires an audio URL via RawRepresentationFactory.usingvardummyStream=newMemoryStream();varresponse=awaitspeechClient.GetTextAsync(dummyStream,newSpeechToTextOptions{ModelId="nova-3",RawRepresentationFactory=_=>newListenV1RequestUrl{Url="https://dpgr.am/spacewalk.wav",},});Console.WriteLine($"Text: {response.Text}");