Sprag: Chorus
Sprag's text-to-speech model that synthesizes 24 kHz mono speech in ten languages from built-in preset voices, voices cloned from reference audio, or voices designed from a written description.
プロバイダー
同じモデルを複数のプロバイダーがホストしている場合があります。バックエンドを固定したい場合は1つのプロバイダーを選び、そうでなければルーティングに選択を任せられます。
対応言語
en
zh
ja
ko
es
pt
ru
de
fr
it
ボイス
機能
Generates spoken audio from text through an OpenAI /v1/audio/speech shape, returning audio bytes rather than JSON.
text_to_speech
Streams raw chunked audio (stream_format=audio) or base64 audio deltas over SSE (stream_format=sse), for pcm and wav output only.
streaming
Serves mp3, flac, wav and pcm at 24 kHz mono and opus at 48 kHz mono.
output_formats
`speed` multiplies the speaking rate over the documented 0.25-4.0 range.
speed_control
Clones a speaker from reference audio passed inline as ref_audio and ref_text or saved once as an organization voice.
voice_cloning
Creates a voice from a written description through /v1/audio/voices/design previews saved as organization voices.
voice_design
コード
ElevenLabs SDKでのストリーミングTTS
ElevenLabs SDKをAllModels経由でルーティングし、音声レスポンスをストリーミングします。
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: "sprag/chorus",
outputFormat: "mp3_44100_128"
}, {
queryParams: {
provider: {
"only": [
"sprag"
]
}
}
});
const reader = stream.getReader();
for (;;) {
const { done, value } = await reader.read();
if (done) break;
// Write value to your response, file, or audio playback pipeline.
}
