Microsoft.Extensions.AI Integration
Cross-SDK comparison
See the centralized MEAI documentation for feature matrices and comparisons across all tryAGI SDKs.
The Gladia SDK implements ISpeechToTextClient from Microsoft.Extensions.AI.
Supported Interfaces
| Interface | Support Level |
|---|---|
ISpeechToTextClient |
Full (file upload + async polling, 100+ languages) |
ISpeechToTextClient
Installation
1 | |
File-Based Transcription
Transcribe an audio file to text. The client uploads the audio, initiates a transcription job, and polls until completion:
1 2 3 4 5 6 7 8 9 10 11 | |
Transcription with Language Hint
Specify a language code for more accurate transcription:
1 2 3 4 5 6 7 8 9 | |
Advanced Configuration with RawRepresentationFactory
Use RawRepresentationFactory to access Gladia-specific features like translation, diarization, and summarization:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | |
Streaming Behavior
GetStreamingTextAsync delegates to the non-streaming GetTextAsync method internally. The batch transcription job (upload + submit + poll) runs to completion first, and then the full result is converted to SpeechToTextResponseUpdate events using ToSpeechToTextResponseUpdates().
This means you will not receive incremental transcription updates as audio is processed. The entire transcript is returned at once after the job finishes. For most use cases, calling GetTextAsync directly is equivalent and simpler.
Note
Gladia does offer a live/streaming transcription API, but it is not exposed through the MEAI ISpeechToTextClient interface. Use the GladiaClient directly for real-time streaming needs.
Accessing the Underlying Client
Retrieve the GladiaClient from the MEAI interface:
1 2 3 4 5 6 7 | |