--- license: cc-by-4.0 language: - en base_model: openbmb/VoxCPM-0.5B base_model_relation: adapter pipeline_tag: text-to-speech tags: - text-to-speech - voxcpm - lora - accent - voice - vctk - baby-mynah --- # baby mynah — Welsh accent (LoRA for VoxCPM-0.5B) A LoRA adapter that voices [VoxCPM-0.5B](https://huggingface.co/openbmb/VoxCPM-0.5B) in the **Welsh** accent of a single VCTK speaker. One of six accent experts behind the [**baby mynah** Space](https://huggingface.co/spaces/build-small-hackathon/baby-mynah), where you can slide between any two of them in weight space. ## What it is - **Base model:** [`openbmb/VoxCPM-0.5B`](https://huggingface.co/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. - **Accent:** Welsh (Cardiff), learned from a single [VCTK](https://datashare.ed.ac.uk/handle/10283/3443) speaker (**p253**, age 22, female) — ~8 minutes of read speech. - **Not PEFT.** VoxCPM uses a custom `LoRALinear`, so this loads through the baby-mynah loader, not `peft`. The weights file stores, per target Linear, `.lora_A` (r, in) and `.lora_B` (out, r); the layer applies `out += (alpha/r) * (x @ A^T @ B^T)`. ## Training | | | |---|---| | 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 | ## Usage 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`](https://huggingface.co/spaces/build-small-hackathon/baby-mynah/blob/main/scripts/blend.py)): ```python 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) ``` ## License & attribution - LoRA weights released under **CC BY 4.0**, following the [VCTK corpus](https://datashare.ed.ac.uk/handle/10283/3443) (CSTR, University of Edinburgh) they were trained on. - Base model **VoxCPM-0.5B** by **OpenBMB**, Apache-2.0.