Sub-Gen
AI-powered video subtitle generation tool that automatically transcribes and generates subtitles using speech-to-text. Supports Hindi and Hinglish.
From a raw video to styled, word-timed subtitles you can edit and export.
Sub-Gen is a web tool that listens to a video and writes the subtitles for you. It times every word, so captions can pop up word by word or phrase by phrase. Hindi speech comes out as Hinglish, which is Hindi written in English letters. You then style the text, fix any mistakes on a timeline and export the finished video, an SRT file or a video with the subtitles embedded.
From a first commit to a full subtitle editor.
Short videos are watched with the sound off as often as with it on, so captions have become part of the video itself. Writing them by hand means listening, typing and timing every line. Sub-Gen exists to take that work off the creator: upload a clip, let speech-to-text do the first draft, and spend your time on the look and the fixes.
The commit history shows how it grew. The first commit landed on 27 December 2025. In the first days of January 2026 the interface was rebuilt around a video editor with a timeline, and soon after it moved to a React front end talking to a Flask backend. Over the rest of January came undo and redo, a subtitle list with editable text, word-level display, a font library, a style editor and an export dialog.
Late January and early February added the parts that suit social video: an export that matches the on-screen preview, automatic detection of the video’s shape, and presets for vertical, square and landscape formats. In March 2026 the project turned to Hindi. Hindi speech is now routed to a model that writes Hinglish, and the last commits fixed how its words are split into subtitle lines.
Subtitles take longer than the video.
A caption has to say the right words, appear at the right moment and look good on the screen it will be watched on. Doing all three by hand is slow, and most speech-to-text tools stop after the first. They give you a text file and leave the timing, styling and export to other software.
Hindi adds a second problem. Many creators write Hindi in English letters, called Hinglish, and a plain transcript in the Devanagari script is not what their audience expects to read. Sub-Gen sets out to cover the whole path in one place.
- Get an accurate first draft of the subtitles from the audio.
- Time every word, so captions can follow speech closely.
- Write Hindi speech as Hinglish.
- Let the creator fix mistakes and change the look without leaving the page.
- Deliver the result in the shape the video will be posted in.
Six steps from upload to export.
A creator only needs to upload a video, wait for the draft, then adjust and export. The tool accepts MP4, MOV, AVI and MKV files.
- 1. Upload a video: Drop a file onto the page. A preview appears, and the tool picks a matching format preset from the video’s shape.
- 2. Generate the subtitles: Speech-to-text writes the words and times each one. Hindi is detected and written as Hinglish.
- 3. Fix the text and timing: Change any line in a list, or drag it on a timeline. Undo and redo are always available.
- 4. Choose the look: Pick a font, size, weight, colours, background and position, and a display mode, then watch it live on the video.
- 5. Check the export preview: The export dialog shows the subtitles on the video in the chosen format before anything is rendered.
- 6. Download the result: Get a video with the subtitles burned in, an SRT file, or a video with the subtitles embedded as a separate track.
What Sub-Gen can do.
- Automatic subtitles: Turns the speech in a video into subtitles, with a start and end time for every word.
- Hindi as Hinglish: When the audio is Hindi, the subtitles are written in English letters, the way many creators and viewers read it.
- Three display modes: Show one word at a time, a short phrase with a chosen number of words, or a full sentence.
- A full style editor: Choose from a library of 28 fonts, then set size, weight, text colour, background colour and opacity, and where the text sits.
- Editor and timeline: A list of subtitles with their time ranges and a draggable timeline, so text and timing can both be corrected.
- Undo and redo: Every change can be stepped back or forward, from buttons or the keyboard.
- Format presets: Portrait, portrait wide, square and landscape presets, chosen automatically from the video and easy to change.
- Three ways to export: Burn the subtitles into the video, save an SRT file, or embed them as a track you can switch off.
From a video to finished subtitles.
Behind the editor, a video moves through a short pipeline. The audio is transcribed, the words are grouped into subtitle lines, and the creator edits and styles them. The same edited subtitles then feed every kind of export, so what you see is what you download.
- Your video: MP4, MOV, AVI or MKV
- Language check: The spoken language is detected first
- Hindi: Written as Hinglish
- Other languages: Standard speech-to-text
- Word-timed subtitles: Every word has a start and an end time
- Edit and style: Fix text and timing, choose the look and the format
- Burned in: Subtitles drawn on the video
- SRT file: Plain subtitle text with times
- Embedded track: Subtitles kept as a separate track
Subtitles in the script people actually read.
Many Hindi speakers type and read Hindi in English letters. Sub-Gen checks the language of the audio first. If it is Hindi, the video goes to a model trained to write Hindi speech as Hinglish. For any other language, it uses standard Whisper speech-to-text.
Hinglish text had to be split into subtitle lines with care so that captions are short, readable and in step with the voice. The last commits in the history, in March 2026, were all about getting those line breaks right.
A first draft you can finish in the browser.
Speech-to-text is rarely perfect, so the editor is as important as the transcription. You can watch the video with subtitles on top, scroll a list of every line with its time range, edit text in place and drag lines on a timeline. The list follows the video as it plays.
Styling is live. A change to the font, colour, size or position shows on the video at once, and the preview scales so that long lines do not overflow the frame. Choosing a format preset resets the font size and position to values that suit that shape.
- Display modes: Word, phrase or sentence
- Fonts: A library of 28, grouped as sans serif, serif, display and monospace
- Format presets: 9:16, 4:5, 1:1 and 16:9
- Video formats: MP4, MOV and AVI for burned-in export
Three outputs, and two places to render them.
The finished video can have the subtitles burned into the picture, so they show everywhere the video is posted. An SRT file gives you the subtitles as plain text with times, for other editors and players. A video with embedded subtitles keeps them as a separate track that a viewer can turn off.
Burned-in export can run on the server, which is the recommended choice, or entirely in the browser with no upload, which suits short clips and works offline but can be slower for long videos. An export preview in the dialog shows the result in the chosen format first.
A React editor on a Python backend.
A React and TypeScript editor handles everything the creator sees. A Flask backend in Python accepts uploads, runs the speech-to-text and produces the exports. Video work in both the backend and the browser is done with FFmpeg.
- In the browser, Editor: Upload, preview, subtitle list and timeline
- In the browser, Style editor: Fonts, colours, position and display mode
- In the browser, Browser export: Renders the video on the viewer’s own device
- On the server, Flask app: Upload, process and download endpoints
- On the server, Transcriber: Detects the language and writes word-timed text
- On the server, Video editor: Builds SRT files and renders subtitles onto video
- Foundations, Speech models: Whisper, and a Hindi-to-Hinglish variant
- Foundations, FFmpeg: Reads, converts and renders video
- Front end: React, TypeScript, Vite
- Back end: Python, Flask
- Speech to text: OpenAI Whisper, Whisper Hindi to Hinglish model, PyTorch, Hugging Face Transformers
- Video: FFmpeg, FFmpeg in the browser (WebAssembly)
Where it stands.
Sub-Gen is a working tool that runs on your own computer: a Flask server and a React front end, started together with one script. The code is public on GitHub. It is not deployed as a hosted service.
The project was written in about three months, from December 2025 to March 2026.
- It runs locally and needs Python, Node.js and FFmpeg installed.
- Speech-to-text models run on the machine, so long videos can take a while.
- Hindi is the one language with special handling. Other languages use standard speech-to-text, and the Hinglish line splitting was still being refined in the final commits.
- There is no README yet, no hosted version and no automated test suite in the repository.
Built with React, TypeScript, Python, Flask, Whisper, FFmpeg.
Deepender Yadav - AI/ML Engineer & Full-Stack Developer
Selected work
- Edge Drop - A dynamic-island style clipboard shelf that lives on your screen edge. Hover to spring it open, then drag text, images, links, and files straight into any app.
- Wicky - An AI superconnector that finds the right person for you, introduces you only when you both say yes, joins your call by voice, and follows up on what was promised.
- Campus Connect AI - AI-powered multilingual chatbot for campus information. Features Gemini LLM, dynamic knowledge base, Telegram/web interfaces, and a secure admin dashboard.
- Readme Architect AI - SaaS app generating professional GitHub READMEs with Google Gemini AI. Shipped GitHub OAuth, private repo support, JWT auth, dynamic sitemap, and Google Analytics.
- CursorViaCam - Hands-free mouse control with a webcam: move your head to steer the cursor and blink to click. Designed to assist users with motor impairments.
- Buddy - AI text assistant for Android. Type /fix, /formal, /reply or any custom trigger at the end of text in any app, and Buddy rewrites it instantly using Gemini.
- Attend-Sight - An AI-powered attendance tracker that turns uploaded schedules into a beautiful, interactive dashboard for managing your classes.
- Presenta - Create stunning video mockups and screenshots with professional device frames and smooth scrolling animations directly in your browser.
- AI-news-Automation - Automated AI news aggregator that fetches, summarizes, and emails daily tech briefings using Google Gemini AI and Vercel serverless functions.
- Video-to-Shorts - Turns long-form videos into short clips: AI picks the strongest moments, cuts them and adds word-timed subtitles you can edit before export.
- Sub-Gen - AI-powered video subtitle generation tool that automatically transcribes and generates subtitles using speech-to-text. Supports Hindi and Hinglish.
yadavdeepender65@gmail.com · GitHub · LinkedIn