Skip to content
A playhead runs along a film's audio waveform as Whisper, on an NVIDIA GPU, writes each line of speech into an SRT file: They're coming to get you, Barbara

GPU-Accelerated Subtitle Generator

Subtitles for a whole video library, on GPUs the house is already using.

2026

My video library has thousands of files in dozens of languages, and most had no subtitles. This writes them with faster-whisper on the two NVIDIA cards in my homelab. It detects the language, translates to English and saves a .en.srt next to each video, so Plex, Jellyfin and VLC find it on their own.

The same GPUs run Plex transcoding, Tdarr and my house's voice assistant, so the workers wait their turn: each checks for free VRAM before a file and backs off when something else needs the card. Two run from midnight to 4 PM and one in the evening, when Plex is busiest. Whisper also invents lines over silence ("Thank you for watching!"), so a filter of more than 200 patterns throws those out.

How it's made

Python · Whisper AI · CUDA · NVIDIA GPU · Bash

Bash scripts schedule the workers and hand out folders with directory locks, no queue or database. A Python script runs faster-whisper on CUDA and writes the SRT files. How I built it.

CRON OR MANUAL TRIGGER SCHEDULER subtitle-scheduler.sh starts and stops workers cleans stale locks manages the worker lifecycle PARALLEL WORKERS parallel-worker.sh claims a folder with mkdir waits for a free GPU tracks progress WHISPER ENGINE generate-subtitles.py faster-whisper on CUDA filters hallucinations writes SRT files
CRON OR MANUAL TRIGGER SCHEDULER subtitle-scheduler.sh starts and stops workers cleans stale locks manages the worker lifecycle PARALLEL WORKERS parallel-worker.sh claims a folder with mkdir waits for a free GPU tracks progress WHISPER ENGINE generate-subtitles.py faster-whisper on CUDA filters hallucinations writes SRT files

Lineage

If you liked this project, consider sharing it on Hacker News, Bluesky, LinkedIn, or X.

← All works