Google Gemini: Gemini 2.5 Flash Preview TTS
Google Gemini 2.5 Flash text-to-speech (preview): fast, low-latency, cost-efficient high-fidelity speech synthesis with 30 prebuilt voices and prompt-based style control.
Proveedores
Distintos proveedores pueden alojar el mismo modelo. Elige un proveedor cuando necesites un backend fijo, o deja que el enrutamiento elija entre ellos.
Idiomas admitidos
af
sq
am
ar
hy
az
bn
eu
be
bg
my
ca
ceb
cmn
hr
cs
da
nl
en
et
fil
fi
fr
gl
ka
de
el
gu
ht
he
hi
hu
is
id
it
ja
jv
kn
kok
ko
lo
la
lv
lt
lb
mk
mai
mg
ms
ml
mr
mn
ne
nb
nn
or
ps
fa
pl
pt
pa
ro
ru
sr
sd
si
sk
sl
es
sw
sv
ta
te
th
tr
uk
ur
vi
Voces
Funciones
Generates spoken audio from text via generateContent (responseModalities AUDIO).
text_to_speech
Synthesizes speech from fully-submitted text in a single synchronous request.
synchronous
Supports 78 documented languages; the model auto-detects the input language (voices are language-agnostic).
multilingual
Supports multi-speaker audio (up to 2 speakers).
multi_speaker
Style, tone, accent, and pace controllable via natural-language prompts.
style_control
Código
TTS en streaming con el ElevenLabs SDK
Enruta el ElevenLabs SDK a través de AllModels y transmite la respuesta de audio.
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: "gemini/gemini-2-5-flash-tts",
outputFormat: "mp3_44100_128"
}, {
queryParams: {
provider: {
"only": [
"gemini"
]
}
}
});
const reader = stream.getReader();
for (;;) {
const { done, value } = await reader.read();
if (done) break;
// Write value to your response, file, or audio playback pipeline.
}
