Compare and test open-weight models for text, code, voice and vision, no sign-up required. Then move to production with the same OpenAI-compatible API.
Solaria-3 is Gladia's latest speech-to-text model, delivering its highest accuracy on real-world European audio. It transcribes English, French, German, Spanish and Italian (one language per transcription, no code switching) and gives access to Gladia's Audio Intelligence add-ons such as speaker diarization, translation, named entity recognition and sentiment analysis.
Solaria-3 transcribes live audio on AI Endpoints using the Gladia Live V2 API. Use the native API for partial transcripts, final utterances and speaker labels.
Set the endpoint root and your AI Endpoints access token, not a Gladia API key:
export AI_ENDPOINTS_BASE_URL="http://127.0.0.1:8001"
export OVH_AI_ENDPOINTS_ACCESS_TOKEN="<your-access-token>"Do not append /v1 to the native API base URL: it is $AI_ENDPOINTS_BASE_URL/gladia.
For native /gladia/* requests, send your AI Endpoints access token in the x-gladia-key header. You can also use Authorization: Bearer <token>. Anonymous requests omit both headers. See Getting Started for token creation.
Create a session for 16 kHz, 16-bit, mono PCM audio:
Specify the format of your audio: encoding, sample rate, bit depth and channel count must match the samples you send. Explicitly set model to solaria-3 in every session initialization rather than relying on the gateway default.
curl --fail-with-body "$AI_ENDPOINTS_BASE_URL/gladia/v2/live?region=eu-west" \
-H "x-gladia-key: $OVH_AI_ENDPOINTS_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
--data '{"model":"solaria-3","encoding":"wav/pcm","sample_rate":16000,"bit_depth":16,"channels":1,"language_config":{"languages":["en"]},"messages_config":{"receive_partial_transcripts":true,"receive_final_transcripts":true}}'The 201 response contains id and url. Connect to the returned WebSocket URL unchanged; its signed query parameters are credentials. Do not log them or publish them. Send raw PCM samples (not a WAV header or compressed MP3 bytes) as binary messages, paced at real time. Read transcript messages; data.is_final distinguishes final utterances from provisional partials. Replace earlier partials with the same data.id rather than appending duplicates.
When done, send {"type":"stop_recording"}, keep reading until processing finishes and the socket closes, then retrieve the complete result:
curl --fail-with-body "$AI_ENDPOINTS_BASE_URL/gladia/v2/live/<session-id>" \
-H "x-gladia-key: $OVH_AI_ENDPOINTS_ACCESS_TOKEN"A final utterance is not the end of the session. The result status is one of queued, processing, done or error. Poll with a delay and a finite deadline while it is queued or processing; successful completion is done. Stop on error. The failed boolean in session details is not a result status. Reuse the same authenticated project (or anonymous IP) for result access. An inaccessible or unowned resource returns 404.
Install gladiaio-sdk==2.2.0 (pip install gladiaio-sdk==2.2.0). Prepare a 16 kHz, PCM 16-bit mono WAV file named audio.wav. The example removes its header using Python's wave module. These finite timeouts are client choices, not service duration allowances.
import os
import time
import wave
from gladiaio_sdk import (
GladiaClient, LiveV2InitRequest, LiveV2LanguageConfig, LiveV2MessagesConfig,
)
client = GladiaClient(
api_key=os.environ["OVH_AI_ENDPOINTS_ACCESS_TOKEN"], # Sent as x-gladia-key.
api_url=os.environ["AI_ENDPOINTS_BASE_URL"].rstrip("/") + "/gladia",
region="eu-west",
http_timeout=30,
ws_timeout=30,
)
live = client.live_v2()
with wave.open("audio.wav", "rb") as audio:
if (audio.getframerate(), audio.getsampwidth(), audio.getnchannels()) != (16000, 2, 1):
raise ValueError("Expected 16 kHz, 16-bit mono PCM WAV")
session = live.start_session(LiveV2InitRequest(
model="solaria-3",
encoding="wav/pcm", sample_rate=16000,
bit_depth=16, channels=1,
language_config=LiveV2LanguageConfig(languages=["en"]),
messages_config=LiveV2MessagesConfig(receive_final_transcripts=True),
))
def on_message(message):
data = getattr(message, "data", None)
if getattr(message, "type", None) == "transcript" and getattr(data, "is_final", False):
print(data.utterance.text)
try:
session.on("message", on_message)
if not session.wait_until_ready(timeout=30):
raise RuntimeError("Live session did not become ready")
while chunk := audio.readframes(1600):
if session.status in ("ending", "ended"):
raise RuntimeError("Live session ended before all audio was sent")
session.send_audio(chunk)
time.sleep(len(chunk) / (16000 * 2))
session.stop_recording()
if not session.join(timeout=180):
raise TimeoutError("Live session did not finish")
deadline = time.monotonic() + 180
while time.monotonic() < deadline:
result = live.get(session.session_id)
if result.status == "done":
print(result.result.transcription.full_transcript)
break
if result.status == "error":
raise RuntimeError("Live transcription failed")
time.sleep(2)
else:
raise TimeoutError("Result is not ready")
finally:
if session.status != "ended":
session.end_session()Install @gladiaio/sdk@2.2.1 (npm install @gladiaio/sdk@2.2.1). Use a Node.js ES module and a raw PCM file, audio.s16le, encoded as signed little-endian 16-bit, 16 kHz, mono. Unlike the Python example, this file must have no WAV header; renaming a WAV or MP3 does not convert it. In this SDK version, send audio after the connected event, not started, and use getSessionId() to retrieve the result's session ID.
import { readFile } from "node:fs/promises";
import { setTimeout as delay } from "node:timers/promises";
import { GladiaClient } from "@gladiaio/sdk";
const audio = await readFile("audio.s16le");
if (!audio.length || audio.length % 2 !== 0) {
throw new Error("Expected non-empty 16-bit raw PCM");
}
const client = new GladiaClient({
apiKey: process.env.OVH_AI_ENDPOINTS_ACCESS_TOKEN, // Sent as x-gladia-key.
apiUrl: process.env.AI_ENDPOINTS_BASE_URL.replace(/\/$/, "") + "/gladia",
region: "eu-west",
httpTimeout: 30_000,
wsTimeout: 30_000,
});
const live = client.liveV2();
const session = live.startSession({
model: "solaria-3",
encoding: "wav/pcm", sample_rate: 16000,
bit_depth: 16, channels: 1,
language_config: { languages: ["en"] },
messages_config: { receive_final_transcripts: true },
});
let timer;
let sending = Promise.resolve();
const finished = new Promise((resolve, reject) => {
timer = setTimeout(() => reject(new Error("Live session timed out")),
30_000 + audio.length / 32 + 180_000);
// Avoid printing SDK exceptions: they may contain the signed socket URL.
session.on("error", () => reject(new Error("Live transcription failed")));
session.once("ended", ({ code }) => {
if (code === 1000) resolve();
else reject(new Error("Live session closed unexpectedly"));
});
session.once("connected", () => {
sending = (async () => {
for (let offset = 0; offset < audio.length; offset += 3200) {
if (session.status !== "connected") {
throw new Error("Live session disconnected while sending audio");
}
const chunk = audio.subarray(offset, offset + 3200);
session.sendAudio(chunk);
await delay(chunk.length / 32);
}
session.stopRecording();
})().catch(reject);
});
});
session.on("message", (message) => {
if (message.type === "transcript" && message.data.is_final) {
console.log(message.data.utterance.text);
}
});
try {
await finished;
await sending;
const deadline = Date.now() + 180_000;
while (true) {
if (Date.now() >= deadline) throw new Error("Result is not ready");
const result = await live.get(await session.getSessionId());
if (result.status === "done") {
console.log(result.result.transcription.full_transcript);
break;
}
if (result.status === "error") {
throw new Error("Live transcription failed");
}
await delay(2000);
}
} finally {
clearTimeout(timer);
session.endSession();
}Always clean up a failed or abandoned session. Do not blindly retry session creation: a previous request may already have consumed a concurrency slot. SDK errors can contain the signed WebSocket URL; do not log them unredacted.
For native live HTTP requests, enable speaker diarization with "diarization": true at the top level, optionally with "diarization_config": {"min_speakers": 2, "max_speakers": 4}.
With gladiaio-sdk>=2.2, pass a plain dictionary directly to live.start_session(). The SDK sends it as-is, including the Gladia Enterprise diarization fields that are absent from the typed LiveV2InitRequest. No separate HTTP request or requests dependency is needed. Replace the session initialization and on_message function in the Python example above with:
session = live.start_session({
"model": "solaria-3",
"encoding": "wav/pcm", "sample_rate": 16000,
"bit_depth": 16, "channels": 1,
"language_config": {"languages": ["en"]},
"messages_config": {"receive_final_transcripts": True},
"diarization": True,
"diarization_config": {"max_speakers": 3},
})
def on_message(message):
if message.type == "transcript" and message.data.is_final:
utterance = message.data.utterance
print(f"Speaker {utterance.speaker}: {utterance.text}")Keep the configured live client, WAV validation, listener registration, readiness wait, real-time audio pacing, result polling and finally cleanup from the original example. Wait for the socket to be ready before sending audio; call stop_recording() only after all chunks have been sent, then keep reading until the session ends to receive final speaker-labelled transcripts. Do not pass diarization as a keyword to the typed initializer.
Diarization identifies speakers, not their real-world identity. It is computationally expensive: expect increased processing latency, especially for final results, and consult current pricing for its cost. Enable it only when needed. Word-level speaker labels are more precise than a single speaker label for an utterance containing multiple speakers.
The native live API supports:
For native session initialization, put custom_vocabulary and custom_vocabulary_config, custom_spelling and custom_spelling_config, translation and translation_config, named_entity_recognition, and sentiment_analysis inside the realtime_processing object. Keep diarization and optional diarization_config at the top level, not inside realtime_processing.
For example, the following fields can be added to the native initialization JSON above:
{
"model": "solaria-3",
"messages_config": {"receive_realtime_processing_events": true},
"realtime_processing": {
"custom_vocabulary": true,
"custom_vocabulary_config": {"vocabulary": ["OVHcloud"]},
"custom_spelling": true,
"custom_spelling_config": {"spelling_dictionary": {"OVHcloud": ["OVH cloud"]}},
"translation": true,
"translation_config": {"target_languages": ["fr"]},
"named_entity_recognition": true,
"sentiment_analysis": true
},
"diarization": true
}Use the native API specification for the full request schema and result fields.
Always include "model": "solaria-3" in session creation, including SDK calls: SDK defaults may select solaria-1. Merge enabled features into one realtime_processing object. With Python SDK 2.2 or later, use a dictionary for Enterprise fields absent from the typed initializer.
| Feature | Fields to add to session creation | Results to read |
|---|---|---|
| Custom vocabulary | Inside realtime_processing: "custom_vocabulary": true, "custom_vocabulary_config": {"vocabulary": ["OVHcloud"], "default_intensity": 0.4} | Preferred terms in final transcripts; uses phonetic similarity. Compare with a baseline using speech containing the configured terms. |
| Custom spelling | Inside realtime_processing: "custom_spelling": true, "custom_spelling_config": {"spelling_dictionary": {"OVHcloud": ["OVH cloud"]}} | Literal normalization in final transcripts. Key = preferred spelling; values = variants to replace. |
| Punctuation and casing | Top-level "punctuation": true | Final data.utterance.text; compare with text_raw when available. Both use the same setting. |
| Numbers as digits | Top-level "numerals": true | Normalized numbers in final transcripts; use speech containing quantities, dates or amounts. |
| Named entities | Inside realtime_processing: "named_entity_recognition": true | named_entity_recognition → data.results[]: entity_type, text, score and offsets. Finals can also contain utterance.entities[] and inline tags. |
| PII masking | Top-level "pii": true | Redacted final transcripts, pii events and entity metadata. Partials are suppressed under masking. Use this live Enterprise field, not pre-recorded pii_redaction. |
| End-of-turn | Top-level "end_of_turn": true | end_of_turn → data.probability, reason, end, speech_duration. Can precede the final transcript. Silence-based endpointing / speech_end are not semantic turn completion. |
| Sentiment and emotion | Inside realtime_processing: "sentiment_analysis": true | sentiment_analysis → data.results[]: sentiment, emotion, text, timestamps. |
| Diarization | Top-level "diarization": true, optionally "diarization_config": {"max_speakers": 3} | Final data.utterance.speaker and word-level speaker fields. Use mono audio; speaker counts are hints. |
| Translation | Inside realtime_processing: "translation": true, "translation_config": {"target_languages": ["fr"]} | translation → data.target_language, data.translated_utterance.text; associate with the source using data.utterance_id. |
Set messages_config.receive_realtime_processing_events: true and receive_final_transcripts: true. Feature results may arrive after source transcripts: continue receiving until the session ends. Configure toggles on a new session. Treat transcript/entity values as untrusted text, never raw HTML; avoid personal-data logging in privacy mode.
See Gladia Audio Intelligence for feature concepts and configuration details. Its pre-recorded/SaaS examples do not override the live field placement or service restrictions documented here.
Summarization and audio_to_llm are not supported.
| Limit | Anonymous | Authenticated |
|---|---|---|
| HTTP request rate | 2 requests/minute per IP and model | 400 requests/minute per Public Cloud project and model |
| Concurrent live sessions | 1 session per IP | 25 sessions per Public Cloud project |
| Maximum live session duration | 60 seconds | 8 hours |
The native live duration limit is session wall-clock time starting at POST /v2/live, not audio duration and not time since the WebSocket opened. Connect promptly after creating a session: waiting before opening the socket consumes the same allowance. For example, opening an anonymous session's WebSocket 20 seconds after creation leaves only 40 seconds for streaming audio. At expiry, the service gracefully stops recording (stop_recording); keep reading for final results and retrieve the completed result as above.
maximum_duration_without_endpointing controls when an utterance is finalized; it does not change the live session duration limit. Users behind the same NAT share anonymous request and concurrency limits. Creating multiple API keys in the same project does not create independent project quotas. Closing the live session releases its concurrency slot; result GET requests do not create new sessions.
Native multi-channel usage is measured as audio duration × channel count. Diarization increases computation and latency; consult the product's current pricing.
New to AI Endpoints? This guide walks you through everything you need to get an access token, call AI models, and integrate AI APIs into your apps with ease.
Start TutorialExplore what AI Endpoints can do. This guide breaks down current features, future roadmap items, and the platform's core capabilities so you know exactly what to expect.
Start TutorialRunning into issues? This guide helps you solve common problems on AI Endpoints, from error codes to unexpected responses. Get quick answers, clear fixes, and helpful tips to keep your…
Start TutorialLearn how to use OVHcloud AI Endpoints Virtual Models.
Start TutorialExplore the full potential of the ASR API through advanced parameters (diarization, timestamp granularities, chunking strategies, prompts ...) and ready-to-run code examples in Python, cURL, and JavaScript.
Start TutorialTurn hours of audio into sharp, readable summaries! This guide walks you through building an AI-powered audio assistant using ASR and LLMs, perfect for meetings, podcasts, or any voice recordings.
Start TutorialBuild a voice-enabled assistant in under 100 lines of code! Learn how to combine ASR, LLM, and TTS endpoints to create an AI that listens, understands, and responds.
Start TutorialDiscover how to synthesize realistic dialogues and automatically identify who’s speaking. This notebook shows you how to generate speech and label each speaker, perfect for building smart transcripts.
Start Tutorial