Skip to content

MEAI ISpeechToTextClient

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
using var client = new InworldClient(apiKey);

// InworldClient implements Meai.ISpeechToTextClient directly.
Meai.ISpeechToTextClient speechClient = client;

// Metadata is exposed via ISpeechToTextClient.GetService.
var metadata = speechClient.GetService(typeof(Meai.SpeechToTextClientMetadata))
    as Meai.SpeechToTextClientMetadata;