Translated timestamped subtitle generation for authorized SOCAL SKY video content.
See PHASE1.md for the full design spec.
Most of the code is about developing this, to run it on colab using T4 gpu just copy paste colab_socal.py
# 1. Install ffmpeg (system dependency)
brew install ffmpeg # macOS
# apt-get install ffmpeg # Linux
# 2. Python deps
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
# 3. Drop an authorized video into data/input/
cp /path/to/your/video.mp4 data/input/
# 4. Run with the passthrough translator (no model download needed)
python -m src.main data/input/video.mp4 --translator passthrough
# 5. Or run with IndicTrans2 (downloads ~4GB model on first run)
python -m src.main data/input/video.mp4 --translator indictrans2
Outputs land in outputs/<video_id>.{ta,en}.{srt,vtt,txt}, plus a
<video_id>.review.csv (side-by-side Tamil/English with timing + flags) and a
<video_id>.segments.json source-of-truth file.
passthrough — copies Tamil text into English column. For pipeline smoke
tests when you don't want to load a model.indictrans2 — AI4Bharat IndicTrans2 (1B). Local, no API.llm — placeholder for an OpenAI/Anthropic-compatible API translator.
Disabled by default to honor the "no API cost" constraint in PHASE1.md.Add new translators by subclassing src.translation.base.Translator.
The pipeline is cached by content hash. Editing the merger or translator and
re-running will only re-do the affected stage. To force a fresh run, delete
the relevant cache/<audio_hash>/ directory.
1 commits
Python
100.0%
Translated timestamped subtitle generation for authorized SOCAL SKY video content.
See PHASE1.md for the full design spec.
Most of the code is about developing this, to run it on colab using T4 gpu just copy paste colab_socal.py
# 1. Install ffmpeg (system dependency)
brew install ffmpeg # macOS
# apt-get install ffmpeg # Linux
# 2. Python deps
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
# 3. Drop an authorized video into data/input/
cp /path/to/your/video.mp4 data/input/
# 4. Run with the passthrough translator (no model download needed)
python -m src.main data/input/video.mp4 --translator passthrough
# 5. Or run with IndicTrans2 (downloads ~4GB model on first run)
python -m src.main data/input/video.mp4 --translator indictrans2
Outputs land in outputs/<video_id>.{ta,en}.{srt,vtt,txt}, plus a
<video_id>.review.csv (side-by-side Tamil/English with timing + flags) and a
<video_id>.segments.json source-of-truth file.
passthrough — copies Tamil text into English column. For pipeline smoke
tests when you don't want to load a model.indictrans2 — AI4Bharat IndicTrans2 (1B). Local, no API.llm — placeholder for an OpenAI/Anthropic-compatible API translator.
Disabled by default to honor the "no API cost" constraint in PHASE1.md.Add new translators by subclassing src.translation.base.Translator.
The pipeline is cached by content hash. Editing the merger or translator and
re-running will only re-do the affected stage. To force a fresh run, delete
the relevant cache/<audio_hash>/ directory.
1 commits
Python
100.0%