m96-chan/babiniku.rs

Become your avatar — real-time zero-shot voice changer toolkit in pure Rust (MeanVC engines, virtual microphone, TUI). No Python, no CUDA Toolkit.

Rust

6

108 commits

updated Sep 11, 2026

See the code
babiniku
candle
machine-learning
real-time
rust
speech
tui
virtual-microphone
voice-changer
voice-conversion
vtuber
zero-shot

README

babiniku.rs — a high-performance voice conversion library in Rust

Your avatar has a face. Now give it a voice.

Rust License: MIT/Apache-2.0

バ美肉 — babiniku

Babiniku (バーチャル美少女受肉, "incarnating as a virtual girl") is the art of becoming your avatar — not wearing it, being it. Trackers move her hands. Shaders light her hair. And then you unmute, and your own voice walks in and breaks the spell.

babiniku.rs is the missing last mile: a real-time zero-shot voice changer toolkit in pure Rust. Give it a few seconds of your character's voice, speak, and a virtual microphone delivers her voice to Discord, Zoom, OBS — anything with a mic picker. On a plain CPU. No Python, no CUDA Toolkit, no cloud: your voice never leaves your machine.

cargo run --release -p babiniku --features wavlm --bin babiniku -- \
    --reference her_voice.wav --monitor --denoise

Live TUI knobs while you speak: pitch ([ ]), noise suppression (, .), input gate (- =), bandwidth extension (; '), output noise reduction (< >), voice-profile EQ (( )), passthrough A/B (p), self-monitor (l).

The virtual mic runs at 48 kHz and --out recordings are written at 48 kHz: the 16 kHz engines (meanvc, xvc) are upsampled in-process (exact ×3 windowed-sinc), while Seed-VC and CosyVoice2 synthesize at 22.05 kHz / 24 kHz respectively and Vevo-Timbre at 24 kHz, each resampled straight to 48 kHz. On top of that, --bwe <0-100> (or the ;/' knob, off by default) blends in a pure-DSP harmonic exciter that synthesizes the missing 8–16 kHz band (sibilance/"air") from the 3–8 kHz band — it lifts the "gauzy" veil of 16 kHz output at zero added latency, on every engine (#42).

Quit with q — or Ctrl-C / SIGTERM, which run the same clean teardown of the virtual devices; stale babiniku devices left by a killed run are recovered automatically at the next startup.

Install

cargo install --git is the supported install channel (#69) — a plain Rust toolchain is all you need, and CI smoke-tests this exact path on every change:

# CPU baseline — no CUDA Toolkit, no Python, works everywhere
cargo install --git https://github.com/m96-chan/babiniku.rs babiniku
# with a GPU / extras
cargo install --git https://github.com/m96-chan/babiniku.rs babiniku --features cuda        # NVIDIA
cargo install --git https://github.com/m96-chan/babiniku.rs babiniku --features metal       # Apple Silicon
cargo install --git https://github.com/m96-chan/babiniku.rs babiniku --features wavlm       # native voice print from the reference wav
cargo install --git https://github.com/m96-chan/babiniku.rs babiniku --features cuda,seedvc # + Seed-VC (GPL-3.0 build!)
FeatureWhat it addsBuild-time needs
(default)CPU real-time baseline, MeanVC + X-VC + CosyVoice2 + Vevo-Timbre engines (CosyVoice2/Vevo-Timbre live mic still needs a GPU)none beyond Rust (Linux: libpulse headers)
wavlmvoice print computed from the reference wav (ONNX Runtime)downloads the prebuilt ONNX runtime
cudaNVIDIA GPU inference (X-VC live mic, Seed-VC, CosyVoice2/Vevo-Timbre live mic)CUDA Toolkit at build time only — at runtime the driver alone suffices
metalApple-Silicon GPU inferenceXcode Command Line Tools
seedvcSeed-VC engine — the binary becomes GPL-3.0 when distributedGPU recommended at runtime

babiniku --version prints the compiled feature set (and the GPL notice on seedvc builds), so a build's flavor is always auditable.

An installed binary looks for checkpoints in the platform data directory — ~/.local/share/babiniku/ckpt (Linux, honoring $XDG_DATA_HOME), ~/Library/Application Support/babiniku/ckpt (macOS), %APPDATA%\babiniku\ckpt (Windows) — overridable with --ckpt-dir <dir> or BABINIKU_CKPT_DIR; from a repo checkout, ./ckpt keeps working as before. Checkpoint setup per engine: docs/meanvc.md · docs/xvc.md · docs/seedvc.md · docs/cosyvoice.md · docs/vevo.md — for Seed-VC and Vevo-Timbre, babiniku-fetch seedvc/babiniku-fetch vevo download and convert everything in one Rust command (#65; meanvc/xvc/cosyvoice fetchers tracked there).

Publishing to crates.io is blocked on the candle-fork git dependency (crates.io forbids git deps) until the forward-AD patch is upstreamed (#10); until then every crate stays publish = false and --git is the way.

Pick the engine with --engine meanvc (default), --engine xvc (multilingual, incl. Japanese — needs the converted X-VC checkpoints in ckpt/, see docs/xvc.md; real-time on an idle 8-thread CPU via the pipelined driver, comfortably real-time on a GPU with a --features cuda build), --engine cosyvoice (Apache-2.0, needs a GPU for live mic — see docs/cosyvoice.md), --engine vevo (MIT/Apache-2.0 code with CC-BY-NC-4.0 weights, needle-clean like Seed-VC, real-time on GPU (~0.16 s/320 ms block) after the #77/#79 tuning pass — see docs/vevo.md), or --engine seedvc (the most natural voice by ear — needs a build with --features seedvc, which is GPL-3.0 when distributed, and a GPU; see docs/seedvc.md). The TUI shows the active engine and its per-stage RTF.

Use cases

  • VTuber / streaming — stay in character on stream, including impromptu collabs.
  • Meetings & Discord as your avatar — the mic named Babiniku-Virtual-Mic is just… you.
  • Game voice chat — squad hears the character, not the tired human at 2 a.m.
  • Voice privacy — speak publicly without publishing your real voice.

Engines

EngineStatusNotes
MeanVC v1✅ working, official weights~0.14 RTF end-to-end on CPU, ≈0.6 s latency; Mandarin-trained (#28 tracks Japanese)
MeanVC 2⏳ implemented, awaiting official weights40 ms chunks → ~110 ms latency class
X-VC✅ working, official weightsJapanese-native quality; live mic needs the CUDA build (--features cuda, CUDA Toolkit at build time only — RTF ≈ 0.10 on GPU; CPU ≈ 0.9+ falls behind on a busy desktop)
Seed-VC✅ working, official weights (GPL-3.0, opt-in seedvc feature)Most natural by ear; 22.05 kHz BigVGAN line with no decoder-needle pathology (no declick stack needed); sliding-context streaming with SOLA joins, ~0.25 s/0.32 s block on GPU; adaptive voice-profile EQ toward the reference's real spectrum (#49/#50/#62)
CosyVoice2✅ working, official weights (Apache-2.0, default build)LLM-bypassed VC path (24 kHz HiFT, needle-clean like Seed-VC); live mic needs a GPU (--features cuda/metal, CPU RTF 1.3+); sliding-window streaming with an 80 ms crossfade, RTF ≈ 0.27 on GPU (#71/#75)
Vevo-Timbre✅ working, official weights (code MIT/Apache-2.0 default build, weights CC-BY-NC-4.0)HuBERT-large + DiffLlama CFM + Vocos, needle-clean like Seed-VC/CosyVoice2; on par with Seed-VC by ear; live mic real-time on GPU (~0.16 s/320 ms block, late 0 — a candle depthwise-conv fix cut Vocos from ~420 ms to near-free, then that headroom funded a 0.5 s→1.5 s context bump for content intelligibility, still needle-clean — #77/#79) (#72/#74)
Zero-VC🔍 evaluationzero-lookahead (20 ms algorithmic latency) — latency-first candidate; no public code yet (#31)

Every engine is ported weight-compatible and verified stage-by-stage against its official implementation with golden tests (cargo test --workspace). Deep dive, APIs, checkpoint setup, performance notes: docs/meanvc.md. Issues are labeled by architecture (meanvc, meanvc2, xvc, seedvc, cosyvoice, vevo, tui, infra).

Platform support

The engine core is pure Rust and portable; the platform surface — capture/playback and the virtual microphone — lives behind an audio backend layer in crates/babiniku (#51, #52).

PlatformCapture / playbackVirtual micStatus
LinuxPulseAudio/PipeWire✅ null sink + remap (babiniku_mic)✅ working
WindowsWASAPI (cpal)routed to VB-CABLE / VoiceMeeter (auto-detected or --output-device)✅ merged, CI-verified — live VB-CABLE routing awaiting field reports (#53)
macOSCoreAudio (cpal)routed to BlackHole (auto-detected or --output-device)✅ merged, CI-verified — field reports welcome (#54)
Android / iOSAAudio / AVAudioEnginein-app routing (library-first)📋 planned (#56 / #57)

Verify a platform's audio stack in seconds — no model checkpoints needed (lists devices, creates the virtual-mic route, plays a tone through it, captures 1 s of mic audio, tears down):

cargo run --release -p babiniku --example audio_probe

Workspace layout

The repo is a cargo workspace — one crate per engine on a shared foundation:

CrateWhat it is
crates/vc-coreEngine-agnostic foundation: encoder/speaker/vocoder traits, log-mel front-end, BWE post-processing (bwe::Upsampler3x, bwe::Exciter), Error/Result
crates/meanvcMeanVC v1 + MeanVC 2 engines (library name meanvc2), examples, golden tests
crates/babinikuThe babiniku real-time TUI / virtual-mic binary, plus the per-platform audio backends (babiniku::audio: Pulse on Linux, cpal/WASAPI/CoreAudio elsewhere) and the audio_probe example
crates/xvcX-VC engine: GLM-4-Voice tokenizer, ERes2Net, SAC codec, prenet, MMDiT converter + the XvcEngine offline/streaming pipeline (#30)
crates/seedvcSeed-VC engine (GPL-3.0, feature-gated): Whisper-small content, CAM++ speaker, DiT+WaveNet CFM, BigVGAN + SeedVcEngine/SeedVcStream (#50)
crates/cosyvoiceCosyVoice2 engine (Apache-2.0, default build): FSQ tokenizer, causal conformer + CFM flow, HiFT vocoder + CosyVoiceEngine/CosyVoiceStream (#75)
crates/vevoVevo-Timbre engine (code MIT/Apache-2.0, default build; weights CC-BY-NC-4.0): HuBERT-large content-style tokens, DiffLlama flow-matching converter, Vocos vocoder + VevoEngine/VevoStream (#74)
crates/fetchbabiniku-fetch: downloads official weights from Hugging Face (and, for vevo, torchaudio's model hub) and converts them to the engines' fp32 safetensors — no Python needed (#65; seedvc and vevo today, meanvc/xvc/cosyvoice tracked there)

Checkpoints stay at the repo root (ckpt/), as do tools/ and docs/.

Contributing

Fork + pull request only — see CONTRIBUTING.md (issue-first, TDD, demo-before-push; no code as issue attachments).

License

MIT OR Apache-2.0, at your option — except crates/seedvc, which is GPL-3.0 (upstream code and weights) and strictly opt-in: binaries built without the seedvc cargo feature carry no GPL obligations. Model weights belong to their original authors (ASLP-lab/MeanVC et al.); note that crates/vevo's code is MIT/Apache-2.0 like the rest of the workspace, but its released weights are CC-BY-NC-4.0 — non-commercial use only, enforced at download time by babiniku-fetch vevo's confirmation prompt rather than a build-time feature gate. The avatar above is the maintainer's own — bring yours. Header/avatar artwork: a personal modification of a model by こまど (Komado) — shown for illustration only; all rights to the original model belong to its creator.

Contributors

m96-chan

102 commits

claude

6 commits

m96-chan/babiniku.rs

Become your avatar — real-time zero-shot voice changer toolkit in pure Rust (MeanVC engines, virtual microphone, TUI). No Python, no CUDA Toolkit.

Rust

6

108 commits

updated Sep 11, 2026

See the code
babiniku
candle
machine-learning
real-time
rust
speech
tui
virtual-microphone
voice-changer
voice-conversion
vtuber
zero-shot

README

babiniku.rs — a high-performance voice conversion library in Rust

Your avatar has a face. Now give it a voice.

Rust License: MIT/Apache-2.0

バ美肉 — babiniku

Babiniku (バーチャル美少女受肉, "incarnating as a virtual girl") is the art of becoming your avatar — not wearing it, being it. Trackers move her hands. Shaders light her hair. And then you unmute, and your own voice walks in and breaks the spell.

babiniku.rs is the missing last mile: a real-time zero-shot voice changer toolkit in pure Rust. Give it a few seconds of your character's voice, speak, and a virtual microphone delivers her voice to Discord, Zoom, OBS — anything with a mic picker. On a plain CPU. No Python, no CUDA Toolkit, no cloud: your voice never leaves your machine.

cargo run --release -p babiniku --features wavlm --bin babiniku -- \
    --reference her_voice.wav --monitor --denoise

Live TUI knobs while you speak: pitch ([ ]), noise suppression (, .), input gate (- =), bandwidth extension (; '), output noise reduction (< >), voice-profile EQ (( )), passthrough A/B (p), self-monitor (l).

The virtual mic runs at 48 kHz and --out recordings are written at 48 kHz: the 16 kHz engines (meanvc, xvc) are upsampled in-process (exact ×3 windowed-sinc), while Seed-VC and CosyVoice2 synthesize at 22.05 kHz / 24 kHz respectively and Vevo-Timbre at 24 kHz, each resampled straight to 48 kHz. On top of that, --bwe <0-100> (or the ;/' knob, off by default) blends in a pure-DSP harmonic exciter that synthesizes the missing 8–16 kHz band (sibilance/"air") from the 3–8 kHz band — it lifts the "gauzy" veil of 16 kHz output at zero added latency, on every engine (#42).

Quit with q — or Ctrl-C / SIGTERM, which run the same clean teardown of the virtual devices; stale babiniku devices left by a killed run are recovered automatically at the next startup.

Install

cargo install --git is the supported install channel (#69) — a plain Rust toolchain is all you need, and CI smoke-tests this exact path on every change:

# CPU baseline — no CUDA Toolkit, no Python, works everywhere
cargo install --git https://github.com/m96-chan/babiniku.rs babiniku
# with a GPU / extras
cargo install --git https://github.com/m96-chan/babiniku.rs babiniku --features cuda        # NVIDIA
cargo install --git https://github.com/m96-chan/babiniku.rs babiniku --features metal       # Apple Silicon
cargo install --git https://github.com/m96-chan/babiniku.rs babiniku --features wavlm       # native voice print from the reference wav
cargo install --git https://github.com/m96-chan/babiniku.rs babiniku --features cuda,seedvc # + Seed-VC (GPL-3.0 build!)
FeatureWhat it addsBuild-time needs
(default)CPU real-time baseline, MeanVC + X-VC + CosyVoice2 + Vevo-Timbre engines (CosyVoice2/Vevo-Timbre live mic still needs a GPU)none beyond Rust (Linux: libpulse headers)
wavlmvoice print computed from the reference wav (ONNX Runtime)downloads the prebuilt ONNX runtime
cudaNVIDIA GPU inference (X-VC live mic, Seed-VC, CosyVoice2/Vevo-Timbre live mic)CUDA Toolkit at build time only — at runtime the driver alone suffices
metalApple-Silicon GPU inferenceXcode Command Line Tools
seedvcSeed-VC engine — the binary becomes GPL-3.0 when distributedGPU recommended at runtime

babiniku --version prints the compiled feature set (and the GPL notice on seedvc builds), so a build's flavor is always auditable.

An installed binary looks for checkpoints in the platform data directory — ~/.local/share/babiniku/ckpt (Linux, honoring $XDG_DATA_HOME), ~/Library/Application Support/babiniku/ckpt (macOS), %APPDATA%\babiniku\ckpt (Windows) — overridable with --ckpt-dir <dir> or BABINIKU_CKPT_DIR; from a repo checkout, ./ckpt keeps working as before. Checkpoint setup per engine: docs/meanvc.md · docs/xvc.md · docs/seedvc.md · docs/cosyvoice.md · docs/vevo.md — for Seed-VC and Vevo-Timbre, babiniku-fetch seedvc/babiniku-fetch vevo download and convert everything in one Rust command (#65; meanvc/xvc/cosyvoice fetchers tracked there).

Publishing to crates.io is blocked on the candle-fork git dependency (crates.io forbids git deps) until the forward-AD patch is upstreamed (#10); until then every crate stays publish = false and --git is the way.

Pick the engine with --engine meanvc (default), --engine xvc (multilingual, incl. Japanese — needs the converted X-VC checkpoints in ckpt/, see docs/xvc.md; real-time on an idle 8-thread CPU via the pipelined driver, comfortably real-time on a GPU with a --features cuda build), --engine cosyvoice (Apache-2.0, needs a GPU for live mic — see docs/cosyvoice.md), --engine vevo (MIT/Apache-2.0 code with CC-BY-NC-4.0 weights, needle-clean like Seed-VC, real-time on GPU (~0.16 s/320 ms block) after the #77/#79 tuning pass — see docs/vevo.md), or --engine seedvc (the most natural voice by ear — needs a build with --features seedvc, which is GPL-3.0 when distributed, and a GPU; see docs/seedvc.md). The TUI shows the active engine and its per-stage RTF.

Use cases

  • VTuber / streaming — stay in character on stream, including impromptu collabs.
  • Meetings & Discord as your avatar — the mic named Babiniku-Virtual-Mic is just… you.
  • Game voice chat — squad hears the character, not the tired human at 2 a.m.
  • Voice privacy — speak publicly without publishing your real voice.

Engines

EngineStatusNotes
MeanVC v1✅ working, official weights~0.14 RTF end-to-end on CPU, ≈0.6 s latency; Mandarin-trained (#28 tracks Japanese)
MeanVC 2⏳ implemented, awaiting official weights40 ms chunks → ~110 ms latency class
X-VC✅ working, official weightsJapanese-native quality; live mic needs the CUDA build (--features cuda, CUDA Toolkit at build time only — RTF ≈ 0.10 on GPU; CPU ≈ 0.9+ falls behind on a busy desktop)
Seed-VC✅ working, official weights (GPL-3.0, opt-in seedvc feature)Most natural by ear; 22.05 kHz BigVGAN line with no decoder-needle pathology (no declick stack needed); sliding-context streaming with SOLA joins, ~0.25 s/0.32 s block on GPU; adaptive voice-profile EQ toward the reference's real spectrum (#49/#50/#62)
CosyVoice2✅ working, official weights (Apache-2.0, default build)LLM-bypassed VC path (24 kHz HiFT, needle-clean like Seed-VC); live mic needs a GPU (--features cuda/metal, CPU RTF 1.3+); sliding-window streaming with an 80 ms crossfade, RTF ≈ 0.27 on GPU (#71/#75)
Vevo-Timbre✅ working, official weights (code MIT/Apache-2.0 default build, weights CC-BY-NC-4.0)HuBERT-large + DiffLlama CFM + Vocos, needle-clean like Seed-VC/CosyVoice2; on par with Seed-VC by ear; live mic real-time on GPU (~0.16 s/320 ms block, late 0 — a candle depthwise-conv fix cut Vocos from ~420 ms to near-free, then that headroom funded a 0.5 s→1.5 s context bump for content intelligibility, still needle-clean — #77/#79) (#72/#74)
Zero-VC🔍 evaluationzero-lookahead (20 ms algorithmic latency) — latency-first candidate; no public code yet (#31)

Every engine is ported weight-compatible and verified stage-by-stage against its official implementation with golden tests (cargo test --workspace). Deep dive, APIs, checkpoint setup, performance notes: docs/meanvc.md. Issues are labeled by architecture (meanvc, meanvc2, xvc, seedvc, cosyvoice, vevo, tui, infra).

Platform support

The engine core is pure Rust and portable; the platform surface — capture/playback and the virtual microphone — lives behind an audio backend layer in crates/babiniku (#51, #52).

PlatformCapture / playbackVirtual micStatus
LinuxPulseAudio/PipeWire✅ null sink + remap (babiniku_mic)✅ working
WindowsWASAPI (cpal)routed to VB-CABLE / VoiceMeeter (auto-detected or --output-device)✅ merged, CI-verified — live VB-CABLE routing awaiting field reports (#53)
macOSCoreAudio (cpal)routed to BlackHole (auto-detected or --output-device)✅ merged, CI-verified — field reports welcome (#54)
Android / iOSAAudio / AVAudioEnginein-app routing (library-first)📋 planned (#56 / #57)

Verify a platform's audio stack in seconds — no model checkpoints needed (lists devices, creates the virtual-mic route, plays a tone through it, captures 1 s of mic audio, tears down):

cargo run --release -p babiniku --example audio_probe

Workspace layout

The repo is a cargo workspace — one crate per engine on a shared foundation:

CrateWhat it is
crates/vc-coreEngine-agnostic foundation: encoder/speaker/vocoder traits, log-mel front-end, BWE post-processing (bwe::Upsampler3x, bwe::Exciter), Error/Result
crates/meanvcMeanVC v1 + MeanVC 2 engines (library name meanvc2), examples, golden tests
crates/babinikuThe babiniku real-time TUI / virtual-mic binary, plus the per-platform audio backends (babiniku::audio: Pulse on Linux, cpal/WASAPI/CoreAudio elsewhere) and the audio_probe example
crates/xvcX-VC engine: GLM-4-Voice tokenizer, ERes2Net, SAC codec, prenet, MMDiT converter + the XvcEngine offline/streaming pipeline (#30)
crates/seedvcSeed-VC engine (GPL-3.0, feature-gated): Whisper-small content, CAM++ speaker, DiT+WaveNet CFM, BigVGAN + SeedVcEngine/SeedVcStream (#50)
crates/cosyvoiceCosyVoice2 engine (Apache-2.0, default build): FSQ tokenizer, causal conformer + CFM flow, HiFT vocoder + CosyVoiceEngine/CosyVoiceStream (#75)
crates/vevoVevo-Timbre engine (code MIT/Apache-2.0, default build; weights CC-BY-NC-4.0): HuBERT-large content-style tokens, DiffLlama flow-matching converter, Vocos vocoder + VevoEngine/VevoStream (#74)
crates/fetchbabiniku-fetch: downloads official weights from Hugging Face (and, for vevo, torchaudio's model hub) and converts them to the engines' fp32 safetensors — no Python needed (#65; seedvc and vevo today, meanvc/xvc/cosyvoice tracked there)

Checkpoints stay at the repo root (ckpt/), as do tools/ and docs/.

Contributing

Fork + pull request only — see CONTRIBUTING.md (issue-first, TDD, demo-before-push; no code as issue attachments).

License

MIT OR Apache-2.0, at your option — except crates/seedvc, which is GPL-3.0 (upstream code and weights) and strictly opt-in: binaries built without the seedvc cargo feature carry no GPL obligations. Model weights belong to their original authors (ASLP-lab/MeanVC et al.); note that crates/vevo's code is MIT/Apache-2.0 like the rest of the workspace, but its released weights are CC-BY-NC-4.0 — non-commercial use only, enforced at download time by babiniku-fetch vevo's confirmation prompt rather than a build-time feature gate. The avatar above is the maintainer's own — bring yours. Header/avatar artwork: a personal modification of a model by こまど (Komado) — shown for illustration only; all rights to the original model belong to its creator.

Contributors

m96-chan

102 commits

claude

6 commits

Languages

Rust

91.7%

Python

8.3%