VoxCPM2 Krio β€” Full SFT

Full fine-tune of VoxCPM2 on hausa speech data. Trained by FarmerlineML for the darli AI agricultural voice assistant.

Training Details

Parameter Value
Base model openbmb/VoxCPM2 (2B)
Method Full SFT (all parameters)
Learning rate 1e-5
Batch size 1 (grad accum 16, effective batch 16)
Sample rate 16kHz (AudioVAE encoder input)
Final step 1484

Validation Loss:

Step loss/total loss/diff loss/stop
0 0.812414 0.743025 0.046259
500 0.599538 0.591193 0.005564
1000 0.601393 0.591151 0.006828
1129 0.647931 0.576366 0.047710

Datasets:

Usage

from voxcpm import VoxCPM
import soundfile as sf
import numpy as np

model = VoxCPM.from_pretrained(
    "FarmerlineML/voxcpm2-akan-sft",
    load_denoiser=False,
)

def trim_audio(wav, sr, silence_thresh=0.01, max_silence_secs=2.0):
    abs_wav = np.abs(wav)
    window  = int(0.05 * sr)
    n_wins  = len(abs_wav) // window
    max_sil = int(max_silence_secs / 0.05)
    silence_count, cut_sample = 0, len(wav)
    for w in range(n_wins):
        chunk = abs_wav[w * window:(w + 1) * window]
        if chunk.max() < silence_thresh:
            silence_count += 1
            if silence_count >= max_sil:
                cut_sample = (w - max_sil + 1) * window
                break
        else:
            silence_count = 0
    return wav[:min(cut_sample + int(0.1 * sr), len(wav))]

wav = model.generate(
    text="menene rawa da kamfanoni masu zaman kansu ke takawa a hadin gwiwa na duniya",
    reference_wav_path="your_hausa_speaker.wav",
    cfg_value=2.0,
    inference_timesteps=15,
    retry_badcase=False,
    max_len=max(50, len(text) * 4),
)
wav = trim_audio(wav, 48000)
sf.write("output.wav", wav, 48000)

Repo Structure

β”œβ”€β”€ model.safetensors        # Model weights (~9.2GB)
β”œβ”€β”€ audiovae.pth             # AudioVAE decoder
β”œβ”€β”€ config.json              # Model architecture config
β”œβ”€β”€ tokenizer.json           # Tokenizer
β”œβ”€β”€ training/
β”‚   β”œβ”€β”€ train.log            # Full training log
β”‚   β”œβ”€β”€ val_loss_summary.txt # Validation losses per checkpoint
β”‚   └── training_state.json  # Final training state
└── tensorboard/             # TensorBoard event files

Notes

  • Reference audio is required at inference for voice identity anchoring
  • Use max_len=max(50, len(text) * 4) to prevent hallucination after sentence end
  • A post-generation 2-second silence trim is strongly recommended
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for FarmerlineML/voxcpm2-hausa-sft

Base model

openbmb/VoxCPM2
Finetuned
(28)
this model