Open-source speech-to-text built on Whisper that adds word-level timestamps via forced alignment and optional speaker diarization.
McCloudS/subgen
Self-hosted tool that generates SRT or LRC subtitles from media files with OpenAI Whisper, integrated with Bazarr, Plex, Jellyfin, Emby and Tautulli.
- Stars
- 1,504
- Forks
- 122
- Open issues
- 5
- Last commit
- 3 months ago
What is it?
Subgen transcribes audio and video files into .srt or .lrc subtitle files. It can keep the original spoken language or translate foreign speech into English. It runs locally on CPU or Nvidia GPU (CUDA), using stable-ts and faster-whisper under the hood.
It is built to fill gaps in a media library where no subtitles exist or embedded ones are out of sync. Subgen can act as a Whisper provider for Bazarr, or receive webhooks from Plex, Jellyfin, Emby and Tautulli to generate subtitles when media is added or played. It can also scan configured folders and watch them for new files.
It also exposes OpenAI-compatible /v1/audio/transcriptions and /v1/audio/translations endpoints, so other clients that target the Whisper API can use it as a backend. Settings are controlled through environment variables, including skip rules based on existing subtitles and audio tracks.
Key features
- 01Generates SRT subtitles, or LRC files for pure audio.
- 02Transcribes in the source language or translates speech to English.
- 03Runs on CPU or Nvidia GPU via CUDA.
- 04Integrates with Bazarr as a Whisper provider and with Plex, Jellyfin, Emby and Tautulli via webhooks.
- 05Scans and monitors folders to generate subtitles for existing or new files.
- 06Provides OpenAI-compatible transcription and translation endpoints.
Use cases
- Filling in subtitles for a home media library that has none.
- Automatically subtitling new episodes as they are added to Plex or Jellyfin.
- Providing a self-hosted Whisper backend for Bazarr.
- Generating subtitles for personal audio or video recordings through a simple HTTP API.
Quick start
- 1
Set the environment variables TRANSCRIBE_DEVICE and WHISPER_MODEL for your hardware
- 2
Run Subgen in Docker using the CPU or CUDA image from the README
- 3
In Bazarr, set the Whisper Provider Docker Endpoint to http://<your-ip>:9000
Things to know
- Transcription is much faster with an Nvidia GPU, while CPU-only runs are slow.
- AMD GPU (ROCm) support is untested and may not work at all.
- The large-v3-turbo model does not support translation.
Topics
FAQ
- What is subgen?
- Self-hosted tool that generates SRT or LRC subtitles from media files with OpenAI Whisper, integrated with Bazarr, Plex, Jellyfin, Emby and Tautulli. Subgen transcribes audio and video files into .srt or .lrc subtitle files. It can keep the original spoken language or translate foreign speech into English. It runs locally on CPU or Nvidia GPU (CUDA), using stable-ts and faster-whisper under the hood.
- Is subgen free to use? What license does it have?
- subgen is open source under the MIT license. Check the license terms before using it in commercial products.
- Is subgen still maintained?
- Updated within 6 months. The last commit to subgen was on Aug 7, 2026.
- What can I use subgen for?
- Filling in subtitles for a home media library that has none. Automatically subtitling new episodes as they are added to Plex or Jellyfin. Providing a self-hosted Whisper backend for Bazarr. Generating subtitles for personal audio or video recordings through a simple HTTP API.
- How do I install subgen?
- Set the environment variables TRANSCRIBE_DEVICE and WHISPER_MODEL for your hardware Run Subgen in Docker using the CPU or CUDA image from the README In Bazarr, set the Whisper Provider Docker Endpoint to http://<your-ip>:9000
- Where can I get subgen?
- The source code and installation instructions are on GitHub: https://github.com/McCloudS/subgen
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Desktop app that transcribes and translates audio and video offline on your computer, built on OpenAI's Whisper.
Desktop app that transcribes audio and video fully offline on your own device, using Whisper and other speech models.
A Next.js web app that generates timed subtitles from uploaded videos or media links using Together AI's Whisper model.
Local-first AI subtitle generator that runs offline and plugs into DaVinci Resolve, Premiere Pro and After Effects.
Open-source local subtitling for any video: Whisper transcription, translation, styling and burn-in, in the browser, desktop app or CLI, without uploading the video.