Repolode
McCloudS

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. 1

    Set the environment variables TRANSCRIBE_DEVICE and WHISPER_MODEL for your hardware

  2. 2

    Run Subgen in Docker using the CPU or CUDA image from the README

  3. 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