explaingit

hytechnology26-prog/auto-srt-writer

Analysis updated 2026-05-18

0PythonAudience · vibe coderComplexity · 2/5Setup · moderate

TLDR

A command line tool that transcribes English speech and creates matching English and Mandarin subtitle files using local AI.

Mindmap

mindmap
  root((auto-srt-writer))
    What it does
      Transcribes audio to English
      Translates to Mandarin
      Outputs SRT files
    Tech stack
      Python
      Whisper
      Ollama
      ffmpeg
    Use cases
      Bilingual subtitles
      Local translation
      Custom glossary
    Audience
      Video creators
      Language learners
      Hobbyist coders

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Generate bilingual English and Mandarin subtitles for a video automatically.

USE CASE 2

Translate subtitles locally without sending audio or text to a cloud service.

USE CASE 3

Re-translate existing subtitles with a different model without re-running transcription.

USE CASE 4

Add a custom glossary so brand names or technical terms stay untranslated.

What is it built with?

PythonWhisperOllamaffmpegPyTorch

How does it compare?

hytechnology26-prog/auto-srt-writer0xallam/my-recipe0xhassaan/nn-from-scratch
Stars00
LanguagePythonPythonPython
Last pushed2022-11-22
MaintenanceDormant
Setup difficultymoderatemoderatemoderate
Complexity2/52/54/5
Audiencevibe codergeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires installing ffmpeg and Ollama plus pulling a local translation model before first run.

No license information is stated in the provided README.

In plain English

This tool takes an English audio or video file and turns it into a pair of subtitle files, one in English and one in Simplified Mandarin, so you end up with bilingual subtitles ready to use. It works in two steps. First, it transcribes the spoken audio into an English subtitle file using a tool called stable-whisper, which is a version of OpenAI's Whisper speech recognition model that produces more accurate timing for each line. Second, it translates each subtitle line into Mandarin using a local AI model run through Ollama, a program that lets you run language models on your own computer instead of sending data to an outside service. The translation step is designed to handle short subtitle fragments carefully, using a glossary of pinned terms and the surrounding lines for context, so phrases that get split across lines are not translated in a way that loses their meaning. To use it, you need Python 3.10 or newer, a program called ffmpeg for reading audio and video files, and Ollama running locally with a translation model downloaded, such as the default qwen2.5:7b. Setup instructions are given separately for macOS, Linux, and Windows. If you have an Nvidia graphics card, the program will automatically use it to speed up transcription. Running the script on a video file produces two output files, one ending in _en.srt for English and one ending in _zh.srt for Mandarin. There are optional settings to choose a different output folder, use a larger and more accurate Whisper model, switch the translation model, add your own glossary of terms that should stay untranslated, skip transcription and only redo translation, or force the program to use a specific processor. The tool includes a built in glossary that keeps certain brand and product names untranslated, and if a line fails to translate for any reason, it falls back to keeping the original English text in the Mandarin file rather than leaving it blank.

Copy-paste prompts

Prompt 1
Help me install ffmpeg and Ollama so I can run auto-srt-writer on my computer.
Prompt 2
Walk me through generating English and Mandarin subtitles for a video file with this tool.
Prompt 3
Show me how to add a custom glossary of terms that should not be translated.
Prompt 4
Explain how to switch this tool to use a bigger Whisper model for more accurate transcription.

Frequently asked questions

What is auto-srt-writer?

A command line tool that transcribes English speech and creates matching English and Mandarin subtitle files using local AI.

What language is auto-srt-writer written in?

Mainly Python. The stack also includes Python, Whisper, Ollama.

What license does auto-srt-writer use?

No license information is stated in the provided README.

How hard is auto-srt-writer to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is auto-srt-writer for?

Mainly vibe coder.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.