baby mynah β accent experts
Collection
LoRA accent adapters for VoxCPM-0.5B and the Space that morphs between them. One small bird, many English accents. β’ 10 items β’ Updated
How to use build-small-hackathon/baby-mynah-welsh with VoxCPM:
import soundfile as sf
from voxcpm import VoxCPM
model = VoxCPM.from_pretrained("build-small-hackathon/baby-mynah-welsh")
wav = model.generate(
text="VoxCPM is an innovative end-to-end TTS model from ModelBest, designed to generate highly expressive speech.",
prompt_wav_path=None, # optional: path to a prompt speech for voice cloning
prompt_text=None, # optional: reference text
cfg_value=2.0, # LM guidance on LocDiT, higher for better adherence to the prompt, but maybe worse
inference_timesteps=10, # LocDiT inference timesteps, higher for better result, lower for fast speed
normalize=True, # enable external TN tool
denoise=True, # enable external Denoise tool
retry_badcase=True, # enable retrying mode for some bad cases (unstoppable)
retry_badcase_max_times=3, # maximum retrying times
retry_badcase_ratio_threshold=6.0, # maximum length restriction for bad case detection (simple but effective), it could be adjusted for slow pace speech
)
sf.write("output.wav", wav, 16000)
print("saved: output.wav")A LoRA adapter that voices VoxCPM-0.5B in the Welsh accent of a single VCTK speaker. One of the accent experts behind the baby mynah Space, where you can slide between any two of them in weight space.
openbmb/VoxCPM-0.5B (OpenBMB),
a tokenizer-free TTS model. This repo holds only the LoRA delta (~28 MB) β
you also need the base model.LoRALinear, so this loads through the
baby-mynah loader, not peft. The weights file stores, per target Linear,
<prefix>.lora_A (r, in) and <prefix>.lora_B (out, r); the layer applies
out += (alpha/r) * (x @ A^T @ B^T).| Method | LoRA (rank 32, alpha 32, dropout 0) |
| Target modules | q/k/v/o_proj on both the LM and the DiT |
| Steps | 800 (effective batch 4 = batch 1 x grad-accum 4) |
| LR | 1e-4, 50 warmup, weight decay 0.01 |
| Audio | ~8 min, 16 kHz mono |
These adapters are meant to be blended, which is what the Space does. To load
one on its own, use the project's load_adapter / blend_into_model helpers
(see scripts/blend.py):
from blend import load_adapter, blend_into_model, restore_weights, scaling_from_config
from voxcpm import VoxCPM
model = VoxCPM.from_pretrained(hf_model_id="openbmb/VoxCPM-0.5B", optimize=False, device="cuda")
adapter = load_adapter("path/to/this/adapter") # {prefix: (A, B)}
scaling = scaling_from_config("path/to/this/adapter") # alpha / r
# alpha=1.0 applies this expert fully; restore afterwards (surgery is in-place).
snap = blend_into_model(model.tts_model, adapter, adapter, alpha=1.0, scaling=scaling)
wav = model.generate(text="Hello! I am a very small bird.", normalize=True)
restore_weights(model.tts_model, snap)