InworldClient implements Microsoft.Extensions.AI.ISpeechToTextClient so the
same call site works with Inworld, Deepgram, or any other MEAI STT provider.
Non-streaming calls hit the REST /stt/v1/transcribe endpoint. Streaming
calls open a WebSocket to /stt/v1/transcribe:streamBidirectional.
This example assumes using Inworld; is in scope and apiKey contains your Inworld API key.
1 2 3 4 5 6 7 8 9101112
usingvarclient=newInworldClient(apiKey);// InworldClient implements Meai.ISpeechToTextClient directly.Meai.ISpeechToTextClientspeechClient=client;// Metadata is exposed via ISpeechToTextClient.GetService.varmetadata=speechClient.GetService(typeof(Meai.SpeechToTextClientMetadata))asMeai.SpeechToTextClientMetadata;// Provider-qualified STT model IDs can be passed through SpeechToTextOptions.ModelId.vardeepgram=InworldClient.DeepgramFluxGeneralEnglishSttModelId;varsoniox=InworldClient.SonioxSttRealtimeV5ModelId;