Views
No views yet
speech-swift library
(module VoxCPM2TTS).speech speak --engine voxcpm2 ... flags.speech-swift on macOS / iOS.| Variant | Size | Notes |
|---|---|---|
| bf16 | ~5.0 GB | Reference quality, no Linear quantization. |
| int8 | ~3.0 GB | 8-bit group quantization. Mean rel-L2 0.53 % vs bf16. |
QuantizedLinear, 8 bits per element, group size 64,
per-group scales and biases stored as float16.Linear layers inside the LM backbones
(base_lm, residual_lm), the DiT estimator decoder,
feat_encoder.encoder, and the top-level projection heads
(enc_to_lm_proj, lm_to_dit_proj, res_to_dit_proj,
fusion_concat_proj, stop_proj, stop_head, fsq_layer.*, the
time/delta-time MLPs).audio_vae.* weights, RMSNorm /
LayerNorm gain tensors, RoPE lookup tables, Snake alpha,
embedding tables, and 1-D parameters.stop_head).speech-swiftVoxCPM2TTS Swift module.1import VoxCPM2TTS
2
3let model = try await VoxCPM2TTSModel.fromPretrained(
4 modelId: "aufklarer/VoxCPM2-MLX-int8"
5)
6let audio = try await model.generate(text: "Hello from VoxCPM2.", language: "english")speech speak "Hello from VoxCPM2." --engine voxcpm2 --voxcpm2-variant int8 -o hi.wav