Voxtral TTS
Voxtral 4B TTS 2603 läuft über das Modul VoxtralTTS lokal auf Apple Silicon: 20 voreingestellte Stimmen, neun Sprachen und Mono-Sprache mit 24 kHz.
Befehlszeile
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.wavSwift-API
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)
}Server-API
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.pcmVoreingestellte Stimmen
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 |
Grenzen und Zustandsverwaltung
Nur vorgegebene Stimmen; das Klonen anhand von Referenzaudio ist nicht verfügbar. SDK, CLI, WebSocket und HTTP PCM geben Audio während der Erzeugung aus. Der Eingabetext muss zu Beginn vollständig vorliegen. Die Modellgewichte stehen unter CC BY-NC 4.0.
Jede Anfrage besitzt ihren eigenen Sprachmodell-Cache, Codec-Verlauf und Zufallsstartwert. Die Callback-Ausgabe wartet auf den Empfänger. Ein Abschnitt umfasst standardmäßig 3 Frames (240 ms Audio); das Limit beträgt 500 Frames (40 Sekunden). Ein Fehler kann nach bereits ausgegebenem Audio auftreten; nur ein regulärer Abschluss sendet die Endmarkierung.
VoxtralTTSOptions(streamingChunkFrames: 3) · generateStreaming(onChunk:) · AudioChunk.isFinal.