- π¬ vdub-LITE β Lightweight Video Dubbing Pipeline (Hindi, CPU-first)
π¬ vdub-LITE β Lightweight Video Dubbing Pipeline (Hindi, CPU-first)
Bbkblo/vdub-hindi-dubbing (8.8 GB) ka LIGHTWEIGHT version β same pipeline, ~80% chhote models, bina GPU ke.
INPUT = video LINK ya FILE β OUTPUT = Hindi dubbed video (2 audio tracks).
Chinese drama β Hindi dubbing ka pura system: transcript β speaker detection β emotion β translation β voice-cloning TTS (Hindi, INT8) β timing/pattern fit β BGM separation β final mux. CPU (Colab free / laptop / 4 GB RAM) pe chal jata hai.
β‘ Kya naya hai (vs full version)
| Cheez | Full (vdub-hindi-dubbing) | LITE (ye repo) |
|---|---|---|
| TTS core (t3_hi) | 2.14 GB fp32 | 0.65 GB INT8 (Q8_0) β |
| TTS RAM (CPU) | ~3.2 GB | ~1.9 GB β |
| TTS speed (CPU) | baseline | ~3-4x (packed INT8 GEMM) β |
| Translation | NLLB fp32 (2.5 GB) | NLLB ONNX q8 (~0.9 GB) β |
| Separation | Kim 67 MB / MelBand 913 MB | Kim 67 MB (CPU) / MelBand optional |
| S3Gen vocoder | 1.06 GB (upstream se) | 1.06 GB (upstream se, auto-fetch) |
| Repo total | 8.8 GB | ~0.7 GB + runtime fetch ~1.1 GB β |
| Cinematic (Fun-CineForge-style) | pattern transfer | + loudnorm -23 LUFS, pitch (f0) transfer*, lip-sync* |
* experimental stages β neeche "Cinematic notes" dekho.
π’ INT8 quantization β kya aur kaise
t3_hi.safetensors(Chatterbox Hindi T3, 30-layer Llama-520M) ka 218 Linear layers GGUF Q8_0 scheme se quantize hue hain (per-32-block symmetric INT8 β llama.cpp wala standard).- Quality: near-lossless β mean weight SNR 45.4 dB, mean relative RMS error 0.54% (max 0.74%). Poore 30-layer model ka forward + generation CPU pe verify kiya gaya (tests/ me results).
- Embeddings/norms/biases FP32 hi rahe.
- Loader (
lite_loader.py):- model meta-device pe banta hai β fp32 kabhi RAM me nahi aata (2 GB RAM OK)
- CPU pe oneDNN packed INT8 GEMM (3.7x fast) ya
VDUB_W8_PACKED=0se exact dequant-matmul (quality mode) - GPU ho to automatically fallback (W8Linear)
β‘ Quickstart
A) Notebook (sabse aasaan β Colab/Kaggle CPU ya GPU)
notebooks/vdub_lite_runner.ipynbkholoINPUT_URLyaINPUT_FILEdo- Run All β
vdub_out/dubbed_video.mp4
B) CLI (local / cloud)
git clone https://huggingface.co/Bbkblo/vdub-hindi-dubbing-lite
cd vdub-hindi-dubbing-lite
bash fetch_models_lite.sh # ~1.8 GB models
pip install -e "git+https://github.com/resemble-ai/chatterbox.git" --no-deps
pip install librosa safetensors s3tokenizer transformers huggingface_hub soundfile \
scipy conformer omegaconf pyloudnorm diffusers ml-collections optimum onnxruntime
pip install "git+https://github.com/resemble-ai/Perth.git@master"
# vdub_lite.py ke upar CONFIG me INPUT_URL/INPUT_FILE do, phir:
python3 vdub_lite.py
C) Sirf TTS (voice clone, bina video)
from lite_loader import build_t3_lite
# ya seedha vdub_lite.py ka load_tts_lite() β full MTL TTS wrapper ready milta hai
π Pipeline (12 stages, resume-safe)
VIDEO (link/file)
β 1. fetch (yt-dlp ya file)
β 2. transcript (SRT ya SenseVoice ASR)
β 3. clip cutting
β 4. speaker diarization (campplus clustering)
β 5. emotion (SenseVoice tags)
β 6. translation β Hindi (NLLB ONNX q8 / nllb / manual json)
β 7. TTS (Chatterbox HI INT8: speaker clone + emotion exaggeration)
β 8. pattern transfer (+ loudnorm -23 LUFS, pitch transfer optional)
β 9. separation (Kim_Vocal_2 CPU / MelBandRoformer)
β 10. mux (SRT timing + instrumental + keep-original ranges + 2 audio tracks)
β 11. QC (voice similarity report)
β 12. dubbed_video.mp4 + vdub_output.zip (+ Drive upload optional)
ποΈ Key config (vdub_lite.py ke upar)
| Param | Default | Kya karta hai |
|---|---|---|
INPUT_URL / INPUT_FILE |
β | dubbing ka source |
SRT_FILE |
"" | apna subtitle (warna ASR) |
TRANSLATE_MODE |
onnx | onnx (lite) / nllb / manual / auto |
QUANT_MODE |
int8 | int8 (Q8_0) / fp32 fallback |
SPEAKER_MAP |
"" | {"Speaker 1": "Hero"} names |
SONG_RANGES |
"" | [[s,e],...] β yahan original audio rahega |
SEP_MODE |
kim | kim (67MB CPU) / melband (913MB best) |
CINEMATIC |
True | pattern transfer + loudnorm + emotion |
LOUDNORM |
True | broadcast -23 LUFS |
PITCH_TRANSFER |
False | f0 (pitch) original se match β experimental |
LIP_SYNC |
False | Wav2Lip β experimental, CPU slow |
DRIVE_UPLOAD |
False | output Drive me bhi bhejo |
TTS knobs: exaggeration (ANGRY 1.4 / HAPPY 1.1 / SAD 0.4 / NEUTRAL 0.5),
cfg_weight 0.3, temperature 0.8, MAX_SPEED 2.0 (pattern transfer).
β οΈ t3_hi EOS note (22-Aug-2026 live test):
mtl_tts.generateke default params (top_p=1.0, temp 0.8) se model kabhi-kabhi EOS nahi marta (loop).vdub_lite.pyme abtts_generate_lite()hai β duration-cap + repetition- tail trim + pattern-transfer fit. Ye Colab/CPU dono jagah use hota hai.
π¬ Cinematic notes (Fun-CineForge wala sawal)
Fun-CineForge (FunAudioLLM) ek zh/en-only cinematic dubbing model hai β Hindi TTS isse nahi hota. Is liye LITE me "Fun-CineForge-style" cinematic feel inhi chizo se aata hai:
- Emotion exaggeration β SenseVoice emotion tag β Chatterbox ka emotion control
- Pattern transfer β original actor ke pauses/speed/loudness pe exact fit (aapka idea β v2/v3 sessions me live test ho chuka hai β )
- Loudness normalize β broadcast standard (-23 LUFS)
- Pitch transfer (experimental) β original f0_hz se voice pitch match
- Lip-sync (experimental) β Wav2Lip; honest note: CPU pe slow aur quality basic hai. Asli Fun-CineForge-quality Hindi lip-sync ke liye alag bada project lagega (ya Fun-CineForge team ka multilingual release ka wait).
Separation ke liye Fun-CineForge ka MelBandRoformer (913 MB) optional best
quality hai (SEP_MODE=melband).
π€ Models β license table
| Model | License | Use |
|---|---|---|
| Chatterbox t3_hi (INT8 Q8_0) | MIT (ResembleAI) | TTS core |
| Chatterbox S3Gen + ve + tokenizer | MIT | vocoder / voice encoder |
| Kim_Vocal_2 (UVR5) | MIT | separation default |
| MelBandRoformer (Fun-CineForge) | Apache-2.0 | separation best (optional) |
| NLLB-200-600M ONNX q8 | CC-BY-NC-4.0 | translation (non-commercial) |
| SenseVoice/campplus (funasr) | auto-download | ASR/emotion/speaker QC |
βοΈ Honest notes
- Chatterbox output me PerTh watermark embed hota hai (upstream behavior)
- Cloned voice use karne se pehle awaaz wale insaan ki permission lein
- NLLB translation CC-BY-NC hai β commercial use ke liye apna translation API lagao
- INT8 quality near-lossless hai (Q8_0), par 100% fp32 jaisi guarantee nahi β
koi line ajeeb lage to
QUANT_MODE=fp32fallback hai - Sandbox/CPU RAM < 2 GB ho to TTS Colab pe chalao (notebook bana hua hai)
π₯ Credits
- Voice cloning + Hindi TTS: Resemble AI (Chatterbox, MIT)
- Q8_0 quantization scheme: GGUF/llama.cpp standard
- Separation (best): FunAudioLLM (Fun-CineForge, Apache-2.0)
- Translation: Meta (NLLB-200, Xenova ONNX conversion)
- Pipeline + pattern transfer + lite conversion: vdub project (Azim Khorajiya)
Model tree for Bbkblo/vdub-hindi-dubbing-lite
Base model
ResembleAI/chatterbox