Build AI video subtitles and translation
A subtitle pipeline pulls the audio out of a video, transcribes it with word-level timestamps, groups the words into short caption lines, writes an .srt file and, if you want, translates each line into other languages. It uses the speech-to-text part of our voice stack plus a cheap text model for translation, and runs fine as a script or a scheduled job.
Uses the picker's Voice assistant stack, with advice specific to this use case.
Recommended stack
Model
- OpenAI GPT-6 Luna: ~$0.10 in / $0.50 out per 1M tokens (verified 2026-11-29)
- OpenAI speech-to-text API: gpt-transcribe ~$0.0045/min (files); gpt-live-transcribe ~$0.017/min (streaming); whisper-1 $0.006/min shuts down 2027-02-26 (verified 2026-11-29)
- ElevenLabs affiliate: Free plan with 10k credits/mo; paid from $6/mo (Starter) (verified 2026-11-29)
Framework
- Pipecat: Free, open-source voice-agent framework
Hosting
No-code alternative
- Voiceflow: Free trial (no card needed); usage-based billing, no public price list (checked 2026-11-15)
Rough monthly cost
$10–50/mo (speech minutes add up fast)Approximate. Tool prices checked 2026-11-15.Difficulty
AdvancedSome links may be affiliate links. Disclosure
Why this stack
- Timestamps are the part that matters. Google's Gemini 3.5 Transcribe returns word-level start and end times, detects 85+ languages and can label up to 8 speakers. Paid use is about $0.003 a minute of audio in plus $0.002 a minute of text out (roughly $0.005 a minute), and there is a free tier (Gemini API pricing and model page, checked 29 Nov 2026).
- OpenAI's recommended gpt-transcribe (about $0.0045 a minute) returns text and detected languages, but OpenAI's docs say word timestamps and subtitle formats only work with the deprecated whisper-1, which shuts down on 26 February 2027. If you rely on OpenAI for caption timing, plan a migration now (OpenAI speech-to-text guide, checked 29 Nov 2026).
- Translate the finished caption lines, not the audio. A cheap model such as GPT-6 Luna (about $0.10 in / $0.50 out per 1M tokens) or Gemini 3.8 Flash can translate a numbered list of lines and return the same numbering, so the timings stay put. OpenAI's audio translations endpoint, which only outputs English, is also deprecated for 26 February 2027.
- YouTube accepts uploaded caption files: SubRip (.srt, plain UTF-8) is one of its recommended basic formats, and WebVTT (.vtt) is supported too (YouTube Help, checked 29 Nov 2026). FFmpeg, a free open-source tool, extracts the audio and can burn subtitles into the picture for platforms that don't take caption files.
Step-by-step
- Extract a compressed mono audio track from the video with FFmpeg (MP3 or M4A keeps uploads small). Split anything longer than 30 minutes into chunks: Gemini 3.5 Transcribe takes up to 1 hour per request, but only 30 minutes when word timestamps or speaker labels are on.
- Transcribe each chunk with word-level timestamps turned on, then add each chunk's start offset back onto its word times.
- Group the words into caption lines: break at sentence ends and pauses, keep lines short (a common guideline is about 42 characters, two lines at most) and on screen for 1 to 7 seconds, then write the numbered .srt file.
- For each extra language, send the numbered lines to a cheap model with a glossary of names and terms, ask for the same numbering back, check the line count matches, and write one .srt per language.
- Watch the video with subtitles on before publishing and fix names and numbers. Then upload the files to YouTube (or burn them in with FFmpeg for short-form platforms) and keep the original .srt next to the video.
Common pitfalls
- Gemini 3.5 Transcribe can't combine custom vocabulary with word timestamps or speaker labels, and Google notes timestamps may lower accuracy slightly. Fix brand names and jargon in a correction pass instead.
- Long audio is cut off quietly: Gemini still returns 'completed' when it truncates at 30 minutes (with timestamps) or 1 hour. Chunk long videos and check that the last caption's time matches the video length.
- Machine translation gets idioms, names and tone wrong. Have a fluent speaker review important videos, especially anything legal, medical or financial.
- Only subtitle and translate videos you have the rights to. Re-uploading other people's videos with your subtitles can break copyright law and platform rules.
- Keep the original-language .srt as your master file and translate from it, never from another translation.
- If you use OpenAI's whisper-1 for timestamps or SRT output today, it stops working on 26 February 2027. Test a replacement well before then.
FAQ
How much does it cost to subtitle a video with AI?
Transcription is the main cost. With Gemini 3.5 Transcribe at about $0.005 a minute on the paid tier, a 10-minute video costs about 5 cents to transcribe, and translating the captions with a cheap model like GPT-6 Luna usually adds less than a cent per language (prices checked 29 Nov 2026).
Can AI create SRT subtitle files?
Yes. Use a speech-to-text model that returns word-level timestamps, such as Gemini 3.5 Transcribe, group the words into short lines and write them in SRT format: a number, a start --> end time, and the text. OpenAI's whisper-1 can output SRT directly but shuts down on 26 February 2027.
Can I translate subtitles automatically?
Yes. Translate the finished caption lines with a text model, keeping the line numbers so the timings don't change, then upload one subtitle file per language to YouTube. Have a fluent speaker check videos that matter.
Try it in the picker: Add subtitles to my YouTube videos · Translate my video subtitles to Spanish · Generate SRT captions for my videos
Customise this stack in the picker →Related stacks
- Build an AI voice assistant (Voice assistant)
- Build an AI meeting notes assistant (AI meeting notes assistant)
- Build an AI social media auto-posting agent (AI social media auto-posting agent)
Last updated 2026-11-29.