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.wav

API 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.pcm

Voces predefinidas

encasual_male, casual_female, cheerful_female, neutral_male, neutral_female
frfr_male, fr_female
eses_male, es_female
dede_male, de_female
itit_male, it_female
ptpt_male, pt_female
nlnl_male, nl_female
arar_male
hihi_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.

MLX 4-bit · Mistral · VoxtralTTS