Views
No views yet
| Parameter | Value |
|---|---|
| Base model | openbmb/VoxCPM2 (2B) |
| Method | Full SFT (all parameters) |
| Learning rate | 1e-5 |
| Batch size | 2 (grad accum 16, effective batch 32) |
| Sample rate | 16kHz (AudioVAE encoder input) |
| Final step | 3028 |
| Step | loss/total | loss/diff | loss/stop |
|---|---|---|---|
| 0 | 0.899851 | 0.799370 | 0.066987 |
| 500 | 0.753233 | 0.704343 | 0.032593 |
| 1000 | 0.691477 | 0.670356 | 0.014081 |
| 1500 | 0.694497 | 0.682667 | 0.007886 |
| 2000 | 0.709386 | 0.686562 | 0.015216 |
| 2500 | 0.691271 | 0.673016 | 0.012170 |
| 3000 | 0.662822 | 0.647756 | 0.010043 |
1from voxcpm import VoxCPM
2import soundfile as sf
3import numpy as np
4
5model = VoxCPM.from_pretrained(
6 "FarmerlineML/voxcpm2-akan-sft",
7 load_denoiser=False,
8)
9
10def trim_audio(wav, sr, silence_thresh=0.01, max_silence_secs=2.0):
11 abs_wav = np.abs(wav)
12 window = int(0.05 * sr)
13 n_wins = len(abs_wav) // window
14 max_sil = int(max_silence_secs / 0.05)
15 silence_count, cut_sample = 0, len(wav)
16 for w in range(n_wins):
17 chunk = abs_wav[w * window:(w + 1) * window]
18 if chunk.max() < silence_thresh:
19 silence_count += 1
20 if silence_count >= max_sil:
21 cut_sample = (w - max_sil + 1) * window
22 break
23 else:
24 silence_count = 0
25 return wav[:min(cut_sample + int(0.1 * sr), len(wav))]
26
27wav = model.generate(
28 text="Ɛnyɛ asɔrekafoɔ no nkoaa na ɔyɛɛ biribi a ɛte saa",
29 reference_wav_path="your_akan_speaker.wav",
30 cfg_value=2.0,
31 inference_timesteps=15,
32 retry_badcase=False,
33 max_len=max(50, len(text) * 4),
34)
35wav = trim_audio(wav, 48000)
36sf.write("output.wav", wav, 48000)voxcpm2-akan-sft/
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 filesmax_len=max(50, len(text) * 4) to prevent hallucination after sentence end