Voxtral TTS
Voxtral 4B TTS 2603 se ejecuta localmente en Apple Silicon mediante el módulo VoxtralTTS: 20 voces predefinidas, nueve idiomas y voz mono a 24 kHz.
Línea de comandos
speech speak "Hello, welcome to Voxtral." --engine voxtral --voxtral-voice casual_male --stream --voxtral-chunk-frames 3 -o hello.wav
speech speak --engine voxtral --list-speakers
speech speak "Bonjour." --engine voxtral --voxtral-voice fr_female --voxtral-max-frames 500 --voxtral-seed 0 -o bonjour.wavAPI de Swift
import VoxtralTTS
let model = try await VoxtralTTSModel.fromPretrained()
for try await chunk in model.generateStream(text: "Hello, welcome to Voxtral.", voice: "casual_male") {
print(chunk.frameIndex, chunk.samples.count, chunk.isFinal)
}API del servidor
curl http://localhost:8080/v1/audio/speech \
-H 'Content-Type: application/json' \
-d '{"model":"voxtral-tts","input":"Hello, welcome to Voxtral.","voice":"casual_male","response_format":"wav"}' \
-o hello.wav/v1/realtime: session.update → {"model":"voxtral-tts","voice":"casual_male"}; response.create → {"instructions":"Hello, welcome to Voxtral."}.
curl http://localhost:8080/v1/audio/speech \
-H 'Content-Type: application/json' \
-d '{"model":"voxtral-tts","input":"Hello, welcome to Voxtral.","voice":"casual_male","stream":true,"response_format":"pcm"}' \
-o hello.pcmVoces predefinidas
en | casual_male, casual_female, cheerful_female, neutral_male, neutral_female |
fr | fr_male, fr_female |
es | es_male, es_female |
de | de_male, de_female |
it | it_male, it_female |
pt | pt_male, pt_female |
nl | nl_male, nl_female |
ar | ar_male |
hi | hi_male, hi_female |
Límites y gestión del estado
Solo voces predefinidas; no se admite clonación con audio de referencia. El SDK, la CLI, WebSocket y HTTP PCM transmiten audio durante la generación. El texto de entrada debe proporcionarse completo al principio. Los pesos usan CC BY-NC 4.0.
Cada solicitud conserva su propia caché del modelo de lenguaje, historial del códec y semilla aleatoria. La entrega por callback espera al consumidor. El bloque predeterminado tiene 3 fotogramas (240 ms de audio) y el límite es de 500 (40 segundos). Puede producirse un fallo después de emitir audio; solo la finalización normal envía el marcador final.
VoxtralTTSOptions(streamingChunkFrames: 3) · generateStreaming(onChunk:) · AudioChunk.isFinal.