A subtitle file is a transcript with a clock attached. Getting the text is the easy half; the times are the hard half.
How it works
An SRT file is plain text. Each caption block has four parts:
1
00:00:00,000 --> 00:00:02,800
مرحباً بكم في الحلقة الأولى
2
00:00:03,600 --> 00:00:07,600
اليوم نتحدث عن تحويل الكلام إلى نص
The Library of Congress format description gives the time format as hours:minutes:seconds,milliseconds, with “two hyphens (—) and a right-pointing angle bracket (>)” between start and end, and a blank line after each block. It calls SRT “a very simple text format, but not well standardized,” with no character-encoding standard. The extension is .srt.
WebVTT, the W3C format for HTML video text tracks, looks almost the same. The spec requires a first line of WEBVTT, a full stop before milliseconds (00:00:10.700), UTF-8 encoding and the text/vtt media type. As of 15 November 2026 it is a W3C Candidate Recommendation Draft.
Why it matters
- Timing comes from the API, or from you. Some speech-to-text APIs return word or segment timestamps or a finished file. OpenAI’s transcription reference lists
srtandvttamong itsresponse_formatvalues, but says the format depends on the model and thatgpt-4o-transcribeandgpt-4o-mini-transcribereturnjsononly. - Arabic layout. SRT has no direction markup, so the player decides how right-to-left text and punctuation are shown. See right-to-left text.
- Readability rules. Line length, lines per caption and reading speed are set by style guides, not by the format.
On BroadNet Inference
BroadNet’s transcription endpoint returns text without timestamps, so it cannot produce SRT directly. The workable approach, tested in Arabic subtitles (SRT) from a speech-to-text API:
- Find pauses with FFmpeg’s
silencedetect(or a VAD). - Cut each speech span, capped at about 12 seconds, to 16 kHz mono WAV.
- Transcribe each span with
language=aron BroadNet Transcribe Arabic. - Use each span’s start and end as caption times, sharing them across lines in proportion to text length.
- Write the numbered SRT blocks.
Span edges are as accurate as your pause detection; times inside a span are estimates. That suits talks and podcasts, not lip-synced drama. For frame-accurate timing, use a provider that documents word timestamps. Short spans also mean more requests, so watch the pay-as-you-go limit of 30 requests a minute. The audio splitter tool writes the FFmpeg commands.
Common mistakes
- Dots instead of commas in SRT times, or the reverse in WebVTT. Many players reject the wrong one.
- Missing blank lines between blocks, which merges captions.