Voxtral TTS

Voxtral 4B TTS 2603 ทำงานในเครื่องบน Apple Silicon ผ่านโมดูล VoxtralTTS รองรับเสียงที่ตั้งไว้ล่วงหน้า 20 เสียง 9 ภาษา และเสียงโมโน 24 kHz

บรรทัดคำสั่ง

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

Swift 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)
}

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

เสียงที่ตั้งไว้ล่วงหน้า

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

ข้อจำกัดและการจัดการสถานะ

รองรับเฉพาะเสียงที่กำหนดไว้ล่วงหน้า ยังไม่รองรับการโคลนจากเสียงอ้างอิง SDK, CLI, WebSocket และ HTTP PCM ส่งเสียงได้ระหว่างการสร้าง ต้องส่งข้อความอินพุตทั้งหมดตั้งแต่เริ่มต้น น้ำหนักโมเดลใช้สัญญาอนุญาต CC BY-NC 4.0

แต่ละคำขอมีแคชโมเดลภาษา ประวัติโคเดก และค่า seed ของตนเอง การส่งผ่าน callback จะรอให้ผู้รับประมวลผลก่อนสร้างต่อ ค่าเริ่มต้นแต่ละช่วงมี 3 เฟรม (เสียง 240 มิลลิวินาที) และจำกัดที่ 500 เฟรม (40 วินาที) อาจเกิดข้อผิดพลาดหลังส่งเสียงบางส่วนแล้ว โดยส่งเครื่องหมายสุดท้ายเฉพาะเมื่อจบตามปกติเท่านั้น

VoxtralTTSOptions(streamingChunkFrames: 3) · generateStreaming(onChunk:) · AudioChunk.isFinal.

MLX 4-bit · Mistral · VoxtralTTS