adapters/gladia-adapter
Voice Router SDK - Gladia Provider / adapters/gladia-adapter
adapters/gladia-adapter
Classes
GladiaAdapter
Gladia transcription provider adapter
Implements transcription for the Gladia API with support for:
- Synchronous and asynchronous transcription
- Speaker diarization (identifying different speakers)
- Multi-language detection and transcription
- Summarization and sentiment analysis
- Custom vocabulary boosting
- Word-level timestamps
See
https://docs.gladia.io/ Gladia API Documentation
Examples
import { GladiaAdapter } from '@meeting-baas/sdk';
const adapter = new GladiaAdapter();
adapter.initialize({
apiKey: process.env.GLADIA_API_KEY
});
const result = await adapter.transcribe({
type: 'url',
url: 'https://example.com/audio.mp3'
}, {
language: 'en',
diarization: true
});
console.log(result.data.text);
console.log(result.data.speakers);const result = await adapter.transcribe(audio, {
language: 'en',
summarization: true,
sentimentAnalysis: true
});
console.log('Summary:', result.data.summary);Extends
Methods
buildStreamingRequest()
privatebuildStreamingRequest(options?):StreamingRequest
Build streaming request with full type safety from OpenAPI specs
Maps normalized options to Gladia streaming request format, including all advanced features like pre-processing, real-time processing, post-processing, and message configuration.
Parameters
| Parameter | Type |
|---|---|
options? | StreamingOptions |
Returns
buildTranscriptionRequest()
privatebuildTranscriptionRequest(audio,options?):InitTranscriptionRequest
Build Gladia transcription request from unified options
Parameters
| Parameter | Type |
|---|---|
audio | AudioInput |
options? | TranscribeOptions |
Returns
createErrorResponse()
protectedcreateErrorResponse(error,statusCode?,code?):UnifiedTranscriptResponse
Helper method to create error responses with stack traces
Parameters
| Parameter | Type | Description |
|---|---|---|
error | unknown | Error object or unknown error |
statusCode? | number | Optional HTTP status code |
code? | ErrorCode | Optional error code (defaults to extracted or UNKNOWN_ERROR) |
Returns
Inherited from
BaseAdapter.createErrorResponse
deleteTranscript()
deleteTranscript(
transcriptId,jobType):Promise<{success:boolean; }>
Delete a transcription job and its associated data
Removes the transcription data from Gladia's servers. This action is irreversible. Supports both pre-recorded and streaming job IDs.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
transcriptId | string | undefined | The ID of the transcript/job to delete |
jobType | "streaming" | "pre-recorded" | "pre-recorded" | Type of job: 'pre-recorded' or 'streaming' (defaults to 'pre-recorded') |
Returns
Promise<{ success: boolean; }>
Promise with success status
Examples
const result = await adapter.deleteTranscript('abc123');
if (result.success) {
console.log('Transcript deleted successfully');
}const result = await adapter.deleteTranscript('stream-456', 'streaming');See
extractSpeakers()
privateextractSpeakers(transcription):Speaker[] |undefined
Extract speaker information from Gladia response
Parameters
| Parameter | Type |
|---|---|
transcription | TranscriptionDTO | undefined |
Returns
Speaker[] | undefined
extractUtterances()
privateextractUtterances(transcription):object[] |undefined
Extract utterances from Gladia response
Parameters
| Parameter | Type |
|---|---|
transcription | TranscriptionDTO | undefined |
Returns
object[] | undefined
extractWords()
privateextractWords(transcription):Word[] |undefined
Extract word timestamps from Gladia response
Parameters
| Parameter | Type |
|---|---|
transcription | TranscriptionDTO | undefined |
Returns
Word[] | undefined
getAudioFile()
getAudioFile(
transcriptId,jobType):Promise<{success:boolean;contentType?:string;data?:ArrayBuffer;error?: {code:string;message:string; }; }>
Download the original audio file from a transcription
Gladia stores the audio files used for transcription and allows downloading them. This works for both pre-recorded and streaming (live) transcriptions.
Returns ArrayBuffer for cross-platform compatibility (Node.js and browser).
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
transcriptId | string | undefined | The ID of the transcript/job |
jobType | "streaming" | "pre-recorded" | "pre-recorded" | Type of job: 'pre-recorded' or 'streaming' (defaults to 'pre-recorded') |
Returns
Promise<{ success: boolean; contentType?: string; data?: ArrayBuffer; error?: { code: string; message: string; }; }>
Promise with the audio file as ArrayBuffer, or error
Examples
const result = await adapter.getAudioFile('abc123');
if (result.success && result.data) {
const buffer = Buffer.from(result.data);
fs.writeFileSync('audio.mp3', buffer);
}const result = await adapter.getAudioFile('abc123');
if (result.success && result.data) {
const blob = new Blob([result.data], { type: 'audio/mpeg' });
const url = URL.createObjectURL(blob);
audioElement.src = url;
}const result = await adapter.getAudioFile('stream-456', 'streaming');
if (result.success && result.data) {
console.log('Audio file size:', result.data.byteLength, 'bytes');
}See
getAxiosConfig()
protectedgetAxiosConfig():object
Get axios config for generated API client functions Configures headers and base URL using Gladia's x-gladia-key header
Returns
object
baseURL
baseURL:
string
headers
headers:
Record<string,string>
timeout
timeout:
number
Overrides
getTranscript()
getTranscript(
transcriptId):Promise<UnifiedTranscriptResponse<TranscriptionProvider>>
Get transcription result by ID
Parameters
| Parameter | Type |
|---|---|
transcriptId | string |
Returns
Promise<UnifiedTranscriptResponse<TranscriptionProvider>>
Overrides
handleWebSocketMessage()
privatehandleWebSocketMessage(message,callbacks?):void
Handle all WebSocket message types from Gladia streaming
Processes transcript, utterance, speech events, real-time processing results (translation, sentiment, NER), post-processing results (summarization, chapterization), acknowledgments, and lifecycle events.
Parameters
| Parameter | Type |
|---|---|
message | unknown |
callbacks? | StreamingCallbacks |
Returns
void
initialize()
initialize(
config):void
Initialize the adapter with configuration
Parameters
| Parameter | Type |
|---|---|
config | ProviderConfig |
Returns
void
Inherited from
listTranscripts()
listTranscripts(
options?):Promise<{transcripts:UnifiedTranscriptResponse<TranscriptionProvider>[];hasMore?:boolean;total?:number; }>
List recent transcriptions with filtering
Retrieves a list of transcription jobs (both pre-recorded and streaming) with optional filtering by status, date, and custom metadata.
Parameters
| Parameter | Type | Description |
|---|---|---|
options? | ListTranscriptsOptions | Filtering and pagination options |
Returns
Promise<{ transcripts: UnifiedTranscriptResponse<TranscriptionProvider>[]; hasMore?: boolean; total?: number; }>
List of transcripts with pagination info
Examples
const { transcripts, hasMore } = await adapter.listTranscripts({
limit: 50,
status: 'done'
})const { transcripts } = await adapter.listTranscripts({
afterDate: '2026-01-01',
beforeDate: '2026-01-31',
limit: 100
})const { transcripts } = await adapter.listTranscripts({
gladia: {
custom_metadata: { project: 'my-project' }
}
})See
normalizeListItem()
privatenormalizeListItem(item):UnifiedTranscriptResponse
Normalize a transcript list item to unified format
Parameters
| Parameter | Type |
|---|---|
item | ListTranscriptionResponseItemsItem |
Returns
normalizeResponse()
privatenormalizeResponse(response):UnifiedTranscriptResponse<"gladia">
Normalize Gladia response to unified format
Parameters
| Parameter | Type |
|---|---|
response | PreRecordedResponse |
Returns
UnifiedTranscriptResponse<"gladia">
pollForCompletion()
protectedpollForCompletion(transcriptId,options?):Promise<UnifiedTranscriptResponse<TranscriptionProvider>>
Generic polling helper for async transcription jobs
Polls getTranscript() until job completes or times out.
Parameters
| Parameter | Type | Description |
|---|---|---|
transcriptId | string | Job/transcript ID to poll |
options? | { intervalMs?: number; maxAttempts?: number; } | Polling configuration |
options.intervalMs? | number | - |
options.maxAttempts? | number | - |
Returns
Promise<UnifiedTranscriptResponse<TranscriptionProvider>>
Final transcription result
Inherited from
transcribe()
transcribe(
audio,options?):Promise<UnifiedTranscriptResponse<TranscriptionProvider>>
Submit audio for transcription
Sends audio to Gladia API for transcription. If a webhook URL is provided, returns immediately with the job ID. Otherwise, polls until completion.
Parameters
| Parameter | Type | Description |
|---|---|---|
audio | AudioInput | Audio input (currently only URL type supported) |
options? | TranscribeOptions | Transcription options |
Returns
Promise<UnifiedTranscriptResponse<TranscriptionProvider>>
Normalized transcription response
Throws
If audio type is not 'url' (file/stream not yet supported)
Examples
const result = await adapter.transcribe({
type: 'url',
url: 'https://example.com/meeting.mp3'
});const result = await adapter.transcribe({
type: 'url',
url: 'https://example.com/meeting.mp3'
}, {
language: 'en',
diarization: true,
speakersExpected: 3,
summarization: true,
customVocabulary: ['API', 'TypeScript', 'JavaScript']
});// Submit transcription with webhook
const result = await adapter.transcribe({
type: 'url',
url: 'https://example.com/meeting.mp3'
}, {
webhookUrl: 'https://myapp.com/webhook/transcription',
language: 'en'
});
// Get job ID for polling
const jobId = result.data?.id;
console.log('Job ID:', jobId); // Use this to poll for status
// Later: Poll for completion (if webhook fails or you want to check)
const status = await adapter.getTranscript(jobId);
if (status.data?.status === 'completed') {
console.log('Transcript:', status.data.text);
}Overrides
transcribeStream()
transcribeStream(
options?,callbacks?):Promise<StreamingSession>
Stream audio for real-time transcription
Creates a WebSocket connection to Gladia for streaming transcription. First initializes a session via REST API, then connects to WebSocket.
Supports all Gladia streaming features:
- Real-time transcription with interim/final results
- Speech detection events (speech_start, speech_end)
- Real-time translation to other languages
- Real-time sentiment analysis
- Real-time named entity recognition
- Post-processing summarization and chapterization
- Audio preprocessing (audio enhancement, speech threshold)
- Custom vocabulary and spelling
- Multi-language code switching
Parameters
| Parameter | Type | Description |
|---|---|---|
options? | StreamingOptions | Streaming configuration options |
callbacks? | StreamingCallbacks | Event callbacks for transcription results |
Returns
Promise<StreamingSession>
Promise that resolves with a StreamingSession
Examples
const session = await adapter.transcribeStream({
encoding: 'linear16', // Unified format - mapped to Gladia's 'wav/pcm'
sampleRate: 16000,
channels: 1,
language: 'en',
interimResults: true
}, {
onOpen: () => console.log('Connected'),
onTranscript: (event) => {
if (event.isFinal) {
console.log('Final:', event.text);
} else {
console.log('Interim:', event.text);
}
},
onError: (error) => console.error('Error:', error),
onClose: () => console.log('Disconnected')
});
// Send audio chunks
const audioChunk = getAudioChunk();
await session.sendAudio({ data: audioChunk });
// Close when done
await session.close();const session = await adapter.transcribeStream({
encoding: 'linear16', // Use unified format
sampleRate: 16000,
language: 'en',
sentimentAnalysis: true,
entityDetection: true,
summarization: true,
gladiaStreaming: {
pre_processing: {
audio_enhancer: true,
speech_threshold: 0.5
},
realtime_processing: {
translation: true,
translation_config: { target_languages: ['fr', 'es'] }
},
post_processing: {
chapterization: true
},
messages_config: {
receive_speech_events: true,
receive_acknowledgments: true,
receive_lifecycle_events: true
}
}
}, {
onTranscript: (e) => console.log('Transcript:', e.text),
onSpeechStart: (e) => console.log('Speech started at:', e.timestamp),
onSpeechEnd: (e) => console.log('Speech ended at:', e.timestamp),
onTranslation: (e) => console.log(`${e.targetLanguage}: ${e.translatedText}`),
onSentiment: (e) => console.log('Sentiment:', e.sentiment),
onEntity: (e) => console.log(`Entity: ${e.type} - ${e.text}`),
onSummarization: (e) => console.log('Summary:', e.summary),
onChapterization: (e) => console.log('Chapters:', e.chapters),
onAudioAck: (e) => console.log('Audio ack:', e.byteRange),
onLifecycle: (e) => console.log('Lifecycle:', e.eventType)
});validateConfig()
protectedvalidateConfig():void
Helper method to validate configuration
Returns
void
Inherited from
Constructors
Constructor
new GladiaAdapter():
GladiaAdapter
Returns
Inherited from
Properties
baseUrl
protectedbaseUrl:string="https://api.gladia.io"
Base URL for provider API (must be defined by subclass)
Overrides
capabilities
readonlycapabilities:ProviderCapabilities
Provider capabilities
Overrides
name
readonlyname:"gladia"
Provider name
Overrides
config?
protectedoptionalconfig:ProviderConfig
Inherited from
Functions
createGladiaAdapter()
createGladiaAdapter(
config):GladiaAdapter
Factory function to create a Gladia adapter
Parameters
| Parameter | Type |
|---|---|
config | ProviderConfig |
Returns
preRecordedControllerDeletePreRecordedJobV2()
preRecordedControllerDeletePreRecordedJobV2<
TData>(id,options?):Promise<TData>
Type Parameters
| Type Parameter | Default type |
|---|---|
TData | AxiosResponse<void, any> |
Parameters
| Parameter | Type |
|---|---|
id | string |
options? | AxiosRequestConfig<any> |
Returns
Promise<TData>
preRecordedControllerGetAudioV2()
preRecordedControllerGetAudioV2<
TData>(id,options?):Promise<TData>
Type Parameters
| Type Parameter | Default type |
|---|---|
TData | AxiosResponse<Blob, any> |
Parameters
| Parameter | Type |
|---|---|
id | string |
options? | AxiosRequestConfig<any> |
Returns
Promise<TData>
preRecordedControllerGetPreRecordedJobV2()
preRecordedControllerGetPreRecordedJobV2<
TData>(id,options?):Promise<TData>
Type Parameters
| Type Parameter | Default type |
|---|---|
TData | AxiosResponse<PreRecordedResponse, any> |
Parameters
| Parameter | Type |
|---|---|
id | string |
options? | AxiosRequestConfig<any> |
Returns
Promise<TData>
preRecordedControllerInitPreRecordedJobV2()
preRecordedControllerInitPreRecordedJobV2<
TData>(initTranscriptionRequest,options?):Promise<TData>
Type Parameters
| Type Parameter | Default type |
|---|---|
TData | AxiosResponse<InitPreRecordedTranscriptionResponse, any> |
Parameters
| Parameter | Type |
|---|---|
initTranscriptionRequest | InitTranscriptionRequest |
options? | AxiosRequestConfig<any> |
Returns
Promise<TData>
streamingControllerDeleteStreamingJobV2()
streamingControllerDeleteStreamingJobV2<
TData>(id,options?):Promise<TData>
Type Parameters
| Type Parameter | Default type |
|---|---|
TData | AxiosResponse<void, any> |
Parameters
| Parameter | Type |
|---|---|
id | string |
options? | AxiosRequestConfig<any> |
Returns
Promise<TData>
streamingControllerGetAudioV2()
streamingControllerGetAudioV2<
TData>(id,options?):Promise<TData>
Type Parameters
| Type Parameter | Default type |
|---|---|
TData | AxiosResponse<Blob, any> |
Parameters
| Parameter | Type |
|---|---|
id | string |
options? | AxiosRequestConfig<any> |
Returns
Promise<TData>
streamingControllerInitStreamingSessionV2()
streamingControllerInitStreamingSessionV2<
TData>(streamingRequest,params?,options?):Promise<TData>
Type Parameters
| Type Parameter | Default type |
|---|---|
TData | AxiosResponse<InitStreamingResponse, any> |
Parameters
| Parameter | Type |
|---|---|
streamingRequest | StreamingRequest |
params? | StreamingControllerInitStreamingSessionV2Params |
options? | AxiosRequestConfig<any> |
Returns
Promise<TData>
transcriptionControllerListV2()
transcriptionControllerListV2<
TData>(params?,options?):Promise<TData>
Type Parameters
| Type Parameter | Default type |
|---|---|
TData | AxiosResponse<ListTranscriptionResponse, any> |
Parameters
| Parameter | Type |
|---|---|
params? | TranscriptionControllerListV2Params |
options? | AxiosRequestConfig<any> |
Returns
Promise<TData>
Interfaces
AudioChunkAckMessage
Properties
acknowledged
acknowledged:
boolean
Flag to indicate if the action was successfully acknowledged
created_at
created_at:
string
Date of creation of the message. The date is formatted as an ISO 8601 string
data
data:
AudioChunkAckMessageData
The message data. "null" if the action was not successfully acknowledged
Nullable
error
error:
AudioChunkAckMessageError
Error message if the action was not successfully acknowledged
Nullable
session_id
session_id:
string
Id of the live session
type
type:
"audio_chunk"
EndRecordingMessage
Properties
created_at
created_at:
string
Date of creation of the message. The date is formatted as an ISO 8601 string
data
data:
EndRecordingMessageData
The message data
session_id
session_id:
string
Id of the live session
type
type:
"end_recording"
EndSessionMessage
Properties
created_at
created_at:
string
Date of creation of the message. The date is formatted as an ISO 8601 string
session_id
session_id:
string
Id of the live session
type
type:
"end_session"
InitTranscriptionRequest
Properties
audio_url
audio_url:
string
URL to a Gladia file or to an external audio or video file
audio_to_llm?
optionalaudio_to_llm:boolean
[Alpha] Enable audio to llm processing for this audio
audio_to_llm_config?
optionalaudio_to_llm_config:GladiaAudioToLlmConfig
[Alpha] Audio to llm configuration, if audio_to_llm is enabled
callback?
optionalcallback:boolean
Enable callback for this transcription. If true, the callback_config property will be used to customize the callback behaviour
callback_config?
optionalcallback_config:CallbackConfigDto
Customize the callback behaviour (url and http method)
callback_url?
optionalcallback_url:string
[Deprecated] Use callback/callback_config instead. Callback URL we will do a POST request to with the result of the transcription
Deprecated
chapterization?
optionalchapterization:boolean
[Alpha] Enable chapterization for this audio
code_switching_config?
optionalcode_switching_config:GladiaCodeSwitchingConfig
[Deprecated] Use language_config instead. Specify the configuration for code switching
Deprecated
context_prompt?
optionalcontext_prompt:string
[Deprecated] Context to feed the transcription model with for possible better accuracy
Deprecated
custom_metadata?
optionalcustom_metadata:InitTranscriptionRequestCustomMetadata
Custom metadata you can attach to this transcription
custom_spelling?
optionalcustom_spelling:boolean
[Alpha] Enable custom spelling for this audio
custom_spelling_config?
optionalcustom_spelling_config:CustomSpellingConfigDTO
[Alpha] Custom spelling configuration, if custom_spelling is enabled
custom_vocabulary?
optionalcustom_vocabulary:boolean
[Beta] Can be either boolean to enable custom_vocabulary for this audio or an array with specific vocabulary list to feed the transcription model with
custom_vocabulary_config?
optionalcustom_vocabulary_config:CustomVocabularyConfigDTO
[Beta] Custom vocabulary configuration, if custom_vocabulary is enabled
detect_language?
optionaldetect_language:boolean
[Deprecated] Use language_config instead. Detect the language from the given audio
Deprecated
diarization?
optionaldiarization:boolean
Enable speaker recognition (diarization) for this audio
diarization_config?
optionaldiarization_config:DiarizationConfigDTO
Speaker recognition configuration, if diarization is enabled
display_mode?
optionaldisplay_mode:boolean
[Alpha] Allows to change the output display_mode for this audio. The output will be reordered, creating new utterances when speakers overlapped
enable_code_switching?
optionalenable_code_switching:boolean
[Deprecated] Use language_config instead.Detect multiple languages in the given audio
Deprecated
language?
optionallanguage:TranscriptionLanguageCodeEnum
[Deprecated] Use language_config instead. Set the spoken language for the given audio (ISO 639 standard)
Deprecated
language_config?
optionallanguage_config:LanguageConfig
Specify the language configuration
moderation?
optionalmoderation:boolean
[Alpha] Enable moderation for this audio
name_consistency?
optionalname_consistency:boolean
[Alpha] Enable names consistency for this audio
named_entity_recognition?
optionalnamed_entity_recognition:boolean
[Alpha] Enable named entity recognition for this audio
punctuation_enhanced?
optionalpunctuation_enhanced:boolean
[Alpha] Use enhanced punctuation for this audio
sentences?
optionalsentences:boolean
Enable sentences for this audio
sentiment_analysis?
optionalsentiment_analysis:boolean
Enable sentiment analysis for this audio
structured_data_extraction?
optionalstructured_data_extraction:boolean
[Alpha] Enable structured data extraction for this audio
structured_data_extraction_config?
optionalstructured_data_extraction_config:StructuredDataExtractionConfigDTO
[Alpha] Structured data extraction configuration, if structured_data_extraction is enabled
subtitles?
optionalsubtitles:boolean
Enable subtitles generation for this transcription
subtitles_config?
optionalsubtitles_config:SubtitlesConfigDTO
Configuration for subtitles generation if subtitles is enabled
summarization?
optionalsummarization:boolean
[Beta] Enable summarization for this audio
summarization_config?
optionalsummarization_config:SummarizationConfigDTO
[Beta] Summarization configuration, if summarization is enabled
translation?
optionaltranslation:boolean
[Beta] Enable translation for this audio
translation_config?
optionaltranslation_config:TranslationConfigDTO
[Beta] Translation configuration, if translation is enabled
NamedEntityRecognitionMessage
Properties
created_at
created_at:
string
Date of creation of the message. The date is formatted as an ISO 8601 string
data
data:
NamedEntityRecognitionMessageData
The message data. "null" if the addon failed
Nullable
error
error:
NamedEntityRecognitionMessageError
Error message if the addon failed
Nullable
session_id
session_id:
string
Id of the live session
type
type:
"named_entity_recognition"
PostChapterizationMessage
Properties
created_at
created_at:
string
Date of creation of the message. The date is formatted as an ISO 8601 string
data
data:
PostChapterizationMessageDataProperty
The message data. "null" if the addon failed
Nullable
error
error:
PostChapterizationMessageError
Error message if the addon failed
Nullable
session_id
session_id:
string
Id of the live session
type
type:
"post_chapterization"
PostFinalTranscriptMessage
Properties
created_at
created_at:
string
Date of creation of the message. The date is formatted as an ISO 8601 string
data
data:
StreamingTranscriptionResultDTO
The message data
session_id
session_id:
string
Id of the live session
type
type:
"post_final_transcript"
PostSummarizationMessage
Properties
created_at
created_at:
string
Date of creation of the message. The date is formatted as an ISO 8601 string
data
data:
PostSummarizationMessageDataProperty
The message data. "null" if the addon failed
Nullable
error
error:
PostSummarizationMessageError
Error message if the addon failed
Nullable
session_id
session_id:
string
Id of the live session
type
type:
"post_summarization"
PostTranscriptMessage
Properties
created_at
created_at:
string
Date of creation of the message. The date is formatted as an ISO 8601 string
data
data:
TranscriptionDTO
The message data
session_id
session_id:
string
Id of the live session
type
type:
"post_transcript"
PreRecordedResponse
Properties
created_at
created_at:
string
Creation date
id
id:
string
Id of the job
kind
kind:
"pre-recorded"
post_session_metadata
post_session_metadata:
PreRecordedResponsePostSessionMetadata
For debugging purposes, send data that could help to identify issues
request_id
request_id:
string
Debug id
status
status:
PreRecordedResponseStatus
"queued": the job has been queued. "processing": the job is being processed. "done": the job has been processed and the result is available. "error": an error occurred during the job's processing.
version
version:
number
API version
completed_at?
optionalcompleted_at:string|null
Completion date when status is "done" or "error"
Nullable
custom_metadata?
optionalcustom_metadata:PreRecordedResponseCustomMetadata
Custom metadata given in the initial request
error_code?
optionalerror_code:number|null
HTTP status code of the error if status is "error"
Minimum
400
Maximum
599
Nullable
file?
optionalfile:PreRecordedResponseFile
The file data you uploaded. Can be null if status is "error"
Nullable
request_params?
optionalrequest_params:PreRecordedResponseRequestParams
Parameters used for this pre-recorded transcription. Can be null if status is "error"
Nullable
result?
optionalresult:PreRecordedResponseResult
Pre-recorded transcription's result when status is "done"
Nullable
SentimentAnalysisMessage
Properties
created_at
created_at:
string
Date of creation of the message. The date is formatted as an ISO 8601 string
data
data:
SentimentAnalysisMessageData
The message data. "null" if the addon failed
Nullable
error
error:
SentimentAnalysisMessageError
Error message if the addon failed
Nullable
session_id
session_id:
string
Id of the live session
type
type:
"sentiment_analysis"
SpeechEndMessage
Properties
created_at
created_at:
string
Date of creation of the message. The date is formatted as an ISO 8601 string
data
data:
SpeechMessageData
The message data
session_id
session_id:
string
Id of the live session
type
type:
"speech_end"
SpeechStartMessage
Properties
created_at
created_at:
string
Date of creation of the message. The date is formatted as an ISO 8601 string
data
data:
SpeechMessageData
The message data
session_id
session_id:
string
Id of the live session
type
type:
"speech_start"
StartRecordingMessage
Properties
created_at
created_at:
string
Date of creation of the message. The date is formatted as an ISO 8601 string
session_id
session_id:
string
Id of the live session
type
type:
"start_recording"
StartSessionMessage
Properties
created_at
created_at:
string
Date of creation of the message. The date is formatted as an ISO 8601 string
session_id
session_id:
string
Id of the live session
type
type:
"start_session"
StopRecordingAckMessage
Properties
acknowledged
acknowledged:
boolean
Flag to indicate if the action was successfully acknowledged
created_at
created_at:
string
Date of creation of the message. The date is formatted as an ISO 8601 string
data
data:
StopRecordingAckMessageData
The message data. "null" if the action was not successfully acknowledged
Nullable
error
error:
StopRecordingAckMessageError
Error message if the action was not successfully acknowledged
Nullable
session_id
session_id:
string
Id of the live session
type
type:
"stop_recording"
StreamingRequest
Properties
bit_depth?
optionalbit_depth:StreamingSupportedBitDepthEnum
The bit depth of the audio stream
callback?
optionalcallback:boolean
If true, messages will be sent to configured url.
callback_config?
optionalcallback_config:CallbackConfig
Specify the callback configuration
channels?
optionalchannels:number
The number of channels of the audio stream
Minimum
1
Maximum
8
custom_metadata?
optionalcustom_metadata:StreamingRequestCustomMetadata
Custom metadata you can attach to this live transcription
encoding?
optionalencoding:StreamingSupportedEncodingEnum
The encoding format of the audio stream. Supported formats:
- PCM: 8, 16, 24, and 32 bits
- A-law: 8 bits
- μ-law: 8 bits
Note: No need to add WAV headers to raw audio as the API supports both formats.
endpointing?
optionalendpointing:number
The endpointing duration in seconds. Endpointing is the duration of silence which will cause an utterance to be considered as finished
Minimum
0.01
Maximum
10
language_config?
optionallanguage_config:LanguageConfig
Specify the language configuration
maximum_duration_without_endpointing?
optionalmaximum_duration_without_endpointing:number
The maximum duration in seconds without endpointing. If endpointing is not detected after this duration, current utterance will be considered as finished
Minimum
5
Maximum
60
messages_config?
optionalmessages_config:MessagesConfig
Specify the websocket messages configuration
model?
optionalmodel:"solaria-1"
The model used to process the audio. "solaria-1" is used by default.
post_processing?
optionalpost_processing:PostProcessingConfig
Specify the post-processing configuration
pre_processing?
optionalpre_processing:PreProcessingConfig
Specify the pre-processing configuration
realtime_processing?
optionalrealtime_processing:RealtimeProcessingConfig
Specify the realtime processing configuration
sample_rate?
optionalsample_rate:StreamingSupportedSampleRateEnum
The sample rate of the audio stream
StreamingResponse
Properties
created_at
created_at:
string
Creation date
id
id:
string
Id of the job
kind
kind:
"live"
post_session_metadata
post_session_metadata:
StreamingResponsePostSessionMetadata
For debugging purposes, send data that could help to identify issues
request_id
request_id:
string
Debug id
status
status:
StreamingResponseStatus
"queued": the job has been queued. "processing": the job is being processed. "done": the job has been processed and the result is available. "error": an error occurred during the job's processing.
version
version:
number
API version
completed_at?
optionalcompleted_at:string|null
Completion date when status is "done" or "error"
Nullable
custom_metadata?
optionalcustom_metadata:StreamingResponseCustomMetadata
Custom metadata given in the initial request
error_code?
optionalerror_code:number|null
HTTP status code of the error if status is "error"
Minimum
400
Maximum
599
Nullable
file?
optionalfile:StreamingResponseFile
The file data you uploaded. Can be null if status is "error"
Nullable
request_params?
optionalrequest_params:StreamingResponseRequestParams
Parameters used for this live transcription. Can be null if status is "error"
Nullable
result?
optionalresult:StreamingResponseResult
Live transcription's result when status is "done"
Nullable
TranscriptionDTO
Properties
full_transcript
full_transcript:
string
All transcription on text format without any other information
languages
languages:
TranscriptionLanguageCodeEnum[]
All the detected languages in the audio sorted from the most detected to the less detected
utterances
utterances:
UtteranceDTO[]
Transcribed speech utterances present in the audio
sentences?
optionalsentences:SentencesDTO[]
If sentences has been enabled, sentences results
subtitles?
optionalsubtitles:SubtitleDTO[]
If subtitles has been enabled, subtitles results
TranscriptMessage
Properties
created_at
created_at:
string
Date of creation of the message. The date is formatted as an ISO 8601 string
data
data:
TranscriptMessageData
The message data
session_id
session_id:
string
Id of the live session
type
type:
"transcript"
TranslationMessage
Properties
created_at
created_at:
string
Date of creation of the message. The date is formatted as an ISO 8601 string
data
data:
TranslationMessageData
The message data. "null" if the addon failed
Nullable
error
error:
TranslationMessageError
Error message if the addon failed
Nullable
session_id
session_id:
string
Id of the live session
type
type:
"translation"
UtteranceDTO
Properties
channel
channel:
number
Audio channel of where this utterance has been transcribed from
Minimum
0
confidence
confidence:
number
Confidence on the transcribed utterance (1 = 100% confident)
end
end:
number
End timestamp in seconds of this utterance
language
language:
TranscriptionLanguageCodeEnum
Spoken language in this utterance
start
start:
number
Start timestamp in seconds of this utterance
text
text:
string
Transcription for this utterance
words
words:
WordDTO[]
List of words of the utterance, split by timestamp
speaker?
optionalspeaker:number
If diarization enabled, speaker identification number
Minimum
0
WordDTO
Generated by orval v7.9.0 🍺 Do not edit manually. Gladia Control API OpenAPI spec version: 1.0
Properties
confidence
confidence:
number
Confidence on the transcribed word (1 = 100% confident)
end
end:
number
End timestamps in seconds of the spoken word
start
start:
number
Start timestamps in seconds of the spoken word
word
word:
string
Spoken word
Type Aliases
ListTranscriptionResponseItemsItem
ListTranscriptionResponseItemsItem =
PreRecordedResponse|StreamingResponse
StreamingSupportedBitDepthEnum
StreamingSupportedBitDepthEnum = typeof
StreamingSupportedBitDepthEnum[keyof typeofStreamingSupportedBitDepthEnum]
The bit depth of the audio stream
StreamingSupportedEncodingEnum
StreamingSupportedEncodingEnum =
object
The encoding format of the audio stream. Supported formats:
- PCM: 8, 16, 24, and 32 bits
- A-law: 8 bits
- μ-law: 8 bits
Note: No need to add WAV headers to raw audio as the API supports both formats.
Properties
wav/alaw
readonlywav/alaw:"wav/alaw"='wav/alaw'
wav/pcm
readonlywav/pcm:"wav/pcm"='wav/pcm'
wav/ulaw
readonlywav/ulaw:"wav/ulaw"='wav/ulaw'
StreamingSupportedEncodingEnum
StreamingSupportedEncodingEnum = typeof
StreamingSupportedEncodingEnum[keyof typeofStreamingSupportedEncodingEnum]
The encoding format of the audio stream. Supported formats:
- PCM: 8, 16, 24, and 32 bits
- A-law: 8 bits
- μ-law: 8 bits
Note: No need to add WAV headers to raw audio as the API supports both formats.
StreamingSupportedModels
StreamingSupportedModels =
object
The model used to process the audio. "solaria-1" is used by default.
Properties
solaria-1
readonlysolaria-1:"solaria-1"='solaria-1'
StreamingSupportedModels
StreamingSupportedModels = typeof
StreamingSupportedModels[keyof typeofStreamingSupportedModels]
The model used to process the audio. "solaria-1" is used by default.
StreamingSupportedSampleRateEnum
StreamingSupportedSampleRateEnum = typeof
StreamingSupportedSampleRateEnum[keyof typeofStreamingSupportedSampleRateEnum]
The sample rate of the audio stream
TranscriptionControllerListV2Params
TranscriptionControllerListV2Params =
object
Properties
after_date?
optionalafter_date:string
Filter for items after the specified date. Use with before_date for a range. Date in ISO format.
before_date?
optionalbefore_date:string
Include items that occurred before the specified date in ISO format.
custom_metadata?
optionalcustom_metadata:object
Index Signature
[key: string]: unknown
date?
optionaldate:string
Filter items relevant to a specific date in ISO format (YYYY-MM-DD).
kind?
optionalkind:TranscriptionControllerListV2KindItem[]
Filter the list based on the item type. Supports multiple values from the predefined list.
limit?
optionallimit:number
The maximum number of items to return. Useful for pagination and controlling data payload size.
offset?
optionaloffset:number
The starting point for pagination. A value of 0 starts from the first item.
status?
optionalstatus:TranscriptionControllerListV2StatusItem[]
Filter the list based on item status. Accepts multiple values from the predefined list.
TranscriptionControllerListV2StatusItem
TranscriptionControllerListV2StatusItem = typeof
TranscriptionControllerListV2StatusItem[keyof typeofTranscriptionControllerListV2StatusItem]
Generated by orval v7.9.0 🍺 Do not edit manually. Gladia Control API OpenAPI spec version: 1.0
TranscriptionLanguageCodeEnum
TranscriptionLanguageCodeEnum =
object
Specify the language in which it will be pronounced when sound comparison occurs. Default to transcription language.
Properties
af
readonlyaf:"af"='af'
am
readonlyam:"am"='am'
ar
readonlyar:"ar"='ar'
as
readonlyas:"as"='as'
az
readonlyaz:"az"='az'
ba
readonlyba:"ba"='ba'
be
readonlybe:"be"='be'
bg
readonlybg:"bg"='bg'
bn
readonlybn:"bn"='bn'
bo
readonlybo:"bo"='bo'
br
readonlybr:"br"='br'
bs
readonlybs:"bs"='bs'
ca
readonlyca:"ca"='ca'
cs
readonlycs:"cs"='cs'
cy
readonlycy:"cy"='cy'
da
readonlyda:"da"='da'
de
readonlyde:"de"='de'
el
readonlyel:"el"='el'
en
readonlyen:"en"='en'
es
readonlyes:"es"='es'
et
readonlyet:"et"='et'
eu
readonlyeu:"eu"='eu'
fa
readonlyfa:"fa"='fa'
fi
readonlyfi:"fi"='fi'
fo
readonlyfo:"fo"='fo'
fr
readonlyfr:"fr"='fr'
gl
readonlygl:"gl"='gl'
gu
readonlygu:"gu"='gu'
ha
readonlyha:"ha"='ha'
haw
readonlyhaw:"haw"='haw'
he
readonlyhe:"he"='he'
hi
readonlyhi:"hi"='hi'
hr
readonlyhr:"hr"='hr'
ht
readonlyht:"ht"='ht'
hu
readonlyhu:"hu"='hu'
hy
readonlyhy:"hy"='hy'
id
readonlyid:"id"='id'
is
readonlyis:"is"='is'
it
readonlyit:"it"='it'
ja
readonlyja:"ja"='ja'
jw
readonlyjw:"jw"='jw'
ka
readonlyka:"ka"='ka'
kk
readonlykk:"kk"='kk'
km
readonlykm:"km"='km'
kn
readonlykn:"kn"='kn'
ko
readonlyko:"ko"='ko'
la
readonlyla:"la"='la'
lb
readonlylb:"lb"='lb'
ln
readonlyln:"ln"='ln'
lo
readonlylo:"lo"='lo'
lt
readonlylt:"lt"='lt'
lv
readonlylv:"lv"='lv'
mg
readonlymg:"mg"='mg'
mi
readonlymi:"mi"='mi'
mk
readonlymk:"mk"='mk'
ml
readonlyml:"ml"='ml'
mn
readonlymn:"mn"='mn'
mr
readonlymr:"mr"='mr'
ms
readonlyms:"ms"='ms'
mt
readonlymt:"mt"='mt'
my
readonlymy:"my"='my'
ne
readonlyne:"ne"='ne'
nl
readonlynl:"nl"='nl'
nn
readonlynn:"nn"='nn'
no
readonlyno:"no"='no'
oc
readonlyoc:"oc"='oc'
pa
readonlypa:"pa"='pa'
pl
readonlypl:"pl"='pl'
ps
readonlyps:"ps"='ps'
pt
readonlypt:"pt"='pt'
ro
readonlyro:"ro"='ro'
ru
readonlyru:"ru"='ru'
sa
readonlysa:"sa"='sa'
sd
readonlysd:"sd"='sd'
si
readonlysi:"si"='si'
sk
readonlysk:"sk"='sk'
sl
readonlysl:"sl"='sl'
sn
readonlysn:"sn"='sn'
so
readonlyso:"so"='so'
sq
readonlysq:"sq"='sq'
sr
readonlysr:"sr"='sr'
su
readonlysu:"su"='su'
sv
readonlysv:"sv"='sv'
sw
readonlysw:"sw"='sw'
ta
readonlyta:"ta"='ta'
te
readonlyte:"te"='te'
tg
readonlytg:"tg"='tg'
th
readonlyth:"th"='th'
tk
readonlytk:"tk"='tk'
tl
readonlytl:"tl"='tl'
tr
readonlytr:"tr"='tr'
tt
readonlytt:"tt"='tt'
uk
readonlyuk:"uk"='uk'
ur
readonlyur:"ur"='ur'
uz
readonlyuz:"uz"='uz'
vi
readonlyvi:"vi"='vi'
yi
readonlyyi:"yi"='yi'
yo
readonlyyo:"yo"='yo'
zh
readonlyzh:"zh"='zh'
TranscriptionLanguageCodeEnum
TranscriptionLanguageCodeEnum = typeof
TranscriptionLanguageCodeEnum[keyof typeofTranscriptionLanguageCodeEnum]
Specify the language in which it will be pronounced when sound comparison occurs. Default to transcription language.
Variables
StreamingSupportedBitDepthEnum
StreamingSupportedBitDepthEnum:
object
Type Declaration
NUMBER_16
readonlyNUMBER_16:16=16
NUMBER_24
readonlyNUMBER_24:24=24
NUMBER_32
readonlyNUMBER_32:32=32
NUMBER_8
readonlyNUMBER_8:8=8
StreamingSupportedSampleRateEnum
StreamingSupportedSampleRateEnum:
object
Type Declaration
NUMBER_16000
readonlyNUMBER_16000:16000=16000
NUMBER_32000
readonlyNUMBER_32000:32000=32000
NUMBER_44100
readonlyNUMBER_44100:44100=44100
NUMBER_48000
readonlyNUMBER_48000:48000=48000
NUMBER_8000
readonlyNUMBER_8000:8000=8000
TranscriptionControllerListV2StatusItem
TranscriptionControllerListV2StatusItem:
object
Type Declaration
done
readonlydone:"done"='done'
error
readonlyerror:"error"='error'
processing
readonlyprocessing:"processing"='processing'
queued
readonlyqueued:"queued"='queued'