armenian-video-dubbing

Colab T4 Trial Profile

This guide is the pragmatic path for trying the repository on a free or low-cost Google Colab T4 GPU with a single short video.

What Changed

The build prompt targets a full production stack: Whisper large-v3, SeamlessM4T v2, Fish-Speech, MuseTalk, Demucs, Docker, API, UI, and training workflows. The current codebase is structurally close to that design, but not every piece is equally mature for Colab:

The Colab profile therefore optimizes for one objective: get a short Armenian dubbing run working end-to-end on a T4 with minimal VRAM churn.

Colab Setup

Run these cells in order.

!git clone --branch feat/colab-t4-demo-profile https://github.com/Edmon02/armenian-video-dubbing.git
%cd armenian-video-dubbing
!apt-get -qq update
!apt-get -qq install -y ffmpeg rubberband-cli
!pip install -q -U pip setuptools wheel
!pip install -q -r requirements-colab.txt
!pip install -q -e . --no-deps

Notes:

Optional sanity check:

!python -c "import torch; print('CUDA:', torch.cuda.is_available()); print('GPU:', torch.cuda.get_device_name(0) if torch.cuda.is_available() else 'none')"

Short-Video Inference

dubbed_short.mp4 is the output file produced by the pipeline. You do not need to find it in advance.

If you do not already have a short source video, generate a safe synthetic input_short.mp4 first:

!python scripts/inference/prepare_demo_video.py \
  --mode generate \
  --output /content/input_short.mp4

If you already have your own uploaded video and want to trim it down for Colab:

!python scripts/inference/prepare_demo_video.py \
  --mode trim \
  --input /content/my_video.mp4 \
  --duration 15 \
  --output /content/input_short.mp4

Then use this for the first successful dubbing run:

!python -m src.pipeline /content/input_short.mp4 \
  --output /content/dubbed_short.mp4 \
  --src-lang eng \
  --dialect eastern \
  --emotion neutral \
  --skip-lipsync \
  --no-background \
  --config-override configs/profiles/colab_t4_demo.yaml

If you want the Gradio UI in Colab:

!python -m src.ui.gradio_app \
  --share \
  --config-override configs/profiles/colab_t4_demo.yaml

Smoke-Test Training

For the training smoke tests below, input_short.mp4 is not used directly. Those scripts expect dataset manifests and audio-text pairs, not a single demo video clip.

Download Tiny Armenian ASR Subset

Before training, download a small Armenian ASR dataset slice (80 train + 20 validation):

!python scripts/data_collection/download_cv_tiny.py \
  --output-dir data/common_voice \
  --max-train 80 \
  --max-val 20

Behavior:

ASR LoRA Smoke Test

This is the most realistic training test on a T4 in the current repo.

!python scripts/training/train_asr.py \
  --dataset-type common_voice \
  --cv-dir data/common_voice/manifests \
  --output-dir models/asr/whisper-hy-colab-smoke \
  --max-train-samples 64 \
  --max-eval-samples 16 \
  --config-override configs/profiles/colab_t4_demo.yaml

Expected outcome:

TTS Smoke Test

The repository’s TTS training script is not yet a full production Fish-Speech training pipeline. Use it only as a preprocessing and plumbing check.

!python scripts/training/train_tts.py \
  --dataset-type common_voice \
  --cv-dir data/common_voice/manifests \
  --output-dir models/tts/fish-speech-hy-colab-smoke \
  --max-train-samples 16 \
  --config-override configs/profiles/colab_t4_demo.yaml

Why This Profile Works Better On T4

First Things To Re-Enable After A Successful Trial

  1. Remove --no-background and test audio post-processing.
  2. Try a 10-second lip-sync sample on Colab Pro or a larger GPU.
  3. Move ASR back to medium or large-v3 once memory is stable.
  4. Replace edge-tts with Fish-Speech after wiring a complete inference/training path.