GladiaClient class

Main class for working with Gladia API

Constructors

GladiaClient({required String apiKey, Dio? dio, bool enableLogging = false})
Creates a new instance of GladiaClient

Properties

apiKey String
API key for accessing Gladia services
final
enableLogging bool
Enable detailed HTTP request logging
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createLiveTranscriptionSocket({required String sessionUrl, void onMessage(dynamic)?, void onDone()?, Function? onError}) LiveTranscriptionSocket
Creates WebSocket connection for speech recognition in real time
deleteLiveTranscription({required String id}) Future<bool>
Deletes live transcription by ID
deleteTranscription({required String id}) Future<bool>
Deletes transcription by ID
downloadFile({required String recordId, String? outputPath}) Future<String>
Downloads file by URL
getLiveTranscriptionResult({required String id}) Future<LiveTranscriptionResult>
Gets live transcription result by ID
getTranscriptionList() Future<TranscriptionList>
Gets transcription list
getTranscriptionResult(String transcriptionIdOrUrl) Future<TranscriptionResult>
Gets transcription results by task ID or URL
initiateTranscription({required String audioUrl, String? language, TranscriptionOptions? options}) Future<TranscriptionInitResult>
Sends a request for audio transcription by URL
initLiveTranscription({int sampleRate = 16000, int bitDepth = 16, int channels = 1, String encoding = 'wav/pcm', String? language, TranscriptionOptions? options}) Future<LiveSessionInitResult>
Initializes session for speech recognition in real time
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
streamTranscribeAudio({required Stream<List<int>> audioStream, String? language, TranscriptionOptions? options, int sampleRate = 16000, int bitDepth = 16, int channels = 1, String encoding = 'wav/pcm'}) Stream<TranscriptionMessage>
Performs speech recognition in real time
toString() String
A string representation of this object.
inherited
transcribeAudio({required String audioFile, String? language, TranscriptionOptions? options}) Future<TranscriptionResult>
Performs audio transcription
transcribeFile({required File file, String? language, TranscriptionOptions? options, bool waitForResult = true, int pollInterval = 1000, int maxAttempts = 60}) Future
Performs audio transcription with the ability to wait for the result
uploadAudioFile(File file) Future<UploadResult>
Uploads an audio file to Gladia server

Operators

operator ==(Object other) bool
The equality operator.
inherited