Soniox : Soniox TTS Realtime v2
Soniox real-time streaming text-to-speech model; the successor to tts-rt-v1, adding voice cloning, speed adjustment and silence reduction.
Fournisseurs
Plusieurs fournisseurs peuvent héberger le même modèle. Choisissez-en un lorsque vous avez besoin d’un backend fixe, ou laissez le routage choisir parmi eux.
Langues prises en charge
Aucune liste de langues vérifiée pour ce modèle pour le moment.
Voix
Fonctionnalités
Generates spoken audio from text input.
text_to_speech
Real-time streaming audio output over WebSocket.
streaming
Synthesizes speech from fully-submitted text in a single synchronous request.
synchronous
Supports voice cloning from a reference sample of up to 120 seconds.
voice_cloning
Supports speaking-rate adjustment between 0.7x and 1.3x, not yet mapped on the route.
speed_control
Supports trimming silence from generated audio, not yet mapped on the route.
silence_reduction
Reports timestamps alongside the generated audio.
timestamps
Code
TTS en streaming avec l’ElevenLabs SDK
Fait passer l’ElevenLabs SDK par AllModels et diffuse la réponse audio en streaming.
import { ElevenLabsClient } from "elevenlabs";
const client = new ElevenLabsClient({
apiKey: process.env.ALLMODELS_API_KEY,
baseUrl: "https://api.allmodels.io/el"
});
const stream = await client.textToSpeech.stream("voice_id", {
text: "I'm sorry, Dave. I'm afraid I can't do that.",
modelId: "soniox/tts-rt-v2",
outputFormat: "mp3_44100_128"
}, {
queryParams: {
provider: {
"only": [
"soniox"
]
}
}
});
const reader = stream.getReader();
for (;;) {
const { done, value } = await reader.read();
if (done) break;
// Write value to your response, file, or audio playback pipeline.
}
