---
title: "Arabic SRT subtitles from a speech-to-text API | BroadRouter"
description: "What an SRT file needs, which speech-to-text APIs return timestamps or SRT for Arabic, and a tested pipeline that builds subtitles from a text-only API."
url: https://broadrouter.com/blog/arabic-subtitles-srt-api/
lang: en
updated: 2026-11-15
publisher: BroadRouter (a BroadNet site); API by BroadNet Inference, https://inference.broadnet.ai
---

# Arabic subtitles (SRT) from a speech-to-text API: what you need

By the BroadNet Inference team · 7 min read · Published 2026-11-15 · Updated 2026-11-16

An SRT file needs text plus a start and end time for every caption. APIs with word or segment timestamps, or direct SRT export, give the best timing. BroadNet Transcribe Arabic returns text only, so split audio at pauses, transcribe each chunk and time captions from the chunk offsets. Fine for talks and podcasts, not for frame-accurate film subtitles.

## Key takeaways

-   SRT is a numbered list of captions, each with an hh:mm:ss,mmm --> hh:mm:ss,mmm line. The Library of Congress notes it has no formal specification and no character-encoding standard.
-   BroadNet's documented transcription response is {"text": ...} only: no timestamps, no segments and no SRT output.
-   OpenAI documents SRT and word timestamps only on whisper-1, which it lists for shutdown on February 26, 2027. AssemblyAI and Speechmatics document SRT export; Deepgram and ElevenLabs document word timestamps.
-   Netflix's Arabic guide sets 42 characters per line, two lines and up to 20 characters a second for adult programmes; its general guide caps a caption at 7 seconds.
-   Chunk-level timing is only as precise as your pauses. Inside a chunk, caption times are estimated from text length.

**On this page**

1.  What does an SRT file need?
2.  How long should an Arabic subtitle line be?
3.  Which speech-to-text APIs document timestamps or SRT?
4.  How do you make subtitles from a text-only API?
5.  The pipeline in Python
6.  How accurate is chunk-level timing?
7.  What does it cost, and how fast is it?
8.  Where BroadNet Inference fits

Subtitles are text with times attached. Most of the work in an Arabic subtitle pipeline is getting those times. Some speech-to-text APIs hand them to you as word timestamps or a finished SRT file. Others, including BroadNet Inference, return only the transcript text. This post explains what an SRT file needs, which providers document timestamps, and how to build usable Arabic subtitles from a text-only API, with the limits stated plainly.

BroadRouter is BroadNet’s own site. If you need frame-accurate timing, the honest answer below is a provider with word timestamps, not BroadNet.

## What does an SRT file need?

An SRT (SubRip) file is plain text. Each caption has four parts: a number, a time line, one or two lines of text, and a blank line.

```text
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 and the arrow as two hyphens and a right angle bracket. It also says SRT is “not well standardized” and that SRT files “do not have a character encoding standard”. For Arabic, write UTF-8 and test in your target player. WebVTT, its web successor, uses a full stop instead of the comma before milliseconds.

So the hard requirement is a start and end time for every caption. Text alone is not enough.

## How long should an Arabic subtitle line be?

Use a published style guide rather than guessing. Netflix’s Arabic Timed Text Style Guide (change log dated 2025-12-19) sets:

| Rule | Netflix value |
| --- | --- |
| Characters per line | 42 |
| Lines per caption | Two at most |
| Reading speed, adult programmes | Up to 20 characters per second |
| Reading speed, children’s programmes | Up to 17 characters per second |
| Line breaks | Don’t split a verb from its subject, a preposition from its noun, or a number from what it counts |

Netflix’s general requirements add a minimum of five-sixths of a second and a maximum of 7 seconds per caption. The Arabic guide also asks for Modern Standard Arabic in translated subtitles. That is a translation rule; a transcript of dialect speech stays in dialect.

Those numbers turn into code: wrap at 42 characters, two lines per caption, warn above 20 characters a second, and never hold a caption longer than 7 seconds.

## Which speech-to-text APIs document timestamps or SRT?

We read each provider’s current docs on 15 November 2026. This lists what they document, not how accurate the timing is.

| Provider | What the docs offer | Arabic |
| --- | --- | --- |
| OpenAI | `response_format` `srt`, `vtt` or `verbose_json`, and `timestamp_granularities[]` word or segment, on `whisper-1` only. `gpt-4o-transcribe` and `gpt-4o-mini-transcribe` return `json` only | Not checked. OpenAI’s deprecations page lists `whisper-1`, `gpt-4o-transcribe`, `gpt-4o-mini-transcribe` and `gpt-4o-transcribe-diarize` as deprecated, all shutting down on February 26, 2027, and recommends `gpt-transcribe` or `gpt-live-transcribe` instead |
| AssemblyAI | `GET /v2/transcript/{transcript_id}/srt` or `/vtt`, with `chars_per_caption` | Arabic listed on Universal-2, in its 10 to 25% WER band |
| Speechmatics | `format=srt` on the transcript endpoint; `srt_overrides` with `max_line_length` and `max_lines`; word items carry `start_time` and `end_time` | Arabic, plus an `ar_en` Arabic-English pack |
| Deepgram | Word and utterance timestamps; official Python and JavaScript caption libraries that write SRT and WebVTT | Arabic and regional codes on Nova-3 |
| ElevenLabs | `timestamps_granularity` word or character; each word has `start` and `end` in seconds | Arabic listed, in its 10 to 20% WER band |
| BroadNet Inference | `{"text": ...}` only | Arabic-specific model and a 14-language model |

If you can run models yourself, FFmpeg’s `whisper` filter, built against whisper.cpp, can write `srt` directly and has a `max_len` option for shorter lines.

For a first comparison of Arabic accuracy and price, see the [Arabic speech-to-text API buyer’s guide](https://broadrouter.com/blog/arabic-speech-to-text-api-buyers-guide/) and [speech-to-text pricing compared](https://broadrouter.com/blog/speech-to-text-api-pricing-compared/). Timestamps are one row in that decision, not the only one.

## How do you make subtitles from a text-only API?

You make your own timestamps from where you cut the audio. The steps:

1.  **Find the pauses.** FFmpeg’s `silencedetect` logs `silence_start` and `silence_end` in seconds wherever the level stays below a threshold for a minimum time.
2.  **Turn pauses into speech spans.** Everything between two silences is one span. Cap spans at about 12 seconds, so a speaker who never pauses still produces short captions.
3.  **Transcribe each span.** Cut it to 16 kHz mono WAV and send it with `language=ar`.
4.  **Time the captions.** The span’s start and end are your anchor times. If its text needs several lines, share the span’s time between them in proportion to their length.
5.  **Write SRT** and check line length, reading speed and duration against the style rules.

This is the same splitting as in [transcribing long audio files](https://broadrouter.com/blog/transcribe-long-audio-files-api/), with a different goal. There, chunks are about 10 minutes and you only care about the joined text. Here, chunks are seconds long because each one becomes caption times. The [audio splitter tool](https://broadrouter.com/tools/audio-splitter-ffmpeg/) builds the FFmpeg commands if you prefer to split by hand.

## The pipeline in Python

This script uses the OpenAI Python SDK and FFmpeg. We ran it on 15 November 2026 against a local mock server that answers like BroadNet’s documented endpoint (`{"text": ...}`), with a generated test file of tones and gaps. The SRT above is its output. No BroadNet key was used, so the Arabic text came from the mock, not from the model.

```python
import os, re, subprocess, sys
from openai import OpenAI

FFMPEG = os.environ.get("FFMPEG", "ffmpeg")
client = OpenAI(base_url=os.environ.get("BASE_URL", "https://inference.broadnet.ai/v1"),
                api_key=os.environ["BROADNET_API_KEY"])
MODEL = "broadnet/cohere-transcribe-arabic"
MAX_CHARS, MAX_LINES, MAX_CUE, MAX_CPS = 42, 2, 7.0, 20   # Netflix Arabic / general guide values

def find_speech(path, noise="-35dB", min_silence=0.4, max_span=12.0):
    """Return [(start, end)] seconds of speech between silences, each at most max_span long."""
    log = subprocess.run([FFMPEG, "-hide_banner", "-nostats", "-i", path,
                          "-af", f"silencedetect=n={noise}:d={min_silence}", "-f", "null", "-"],
                         capture_output=True, text=True).stderr
    h, m, s = re.search(r"Duration: (\d+):(\d+):([\d.]+)", log).groups()
    total = int(h) * 3600 + int(m) * 60 + float(s)
    starts = [float(x) for x in re.findall(r"silence_start: (-?[\d.]+)", log)]
    ends = [float(x) for x in re.findall(r"silence_end: ([\d.]+)", log)]
    spans, t = [], 0.0
    for i, s0 in enumerate(starts):
        if s0 - t > 0.2:
            spans.append((t, s0))
        t = ends[i] if i < len(ends) else total
    if total - t > 0.2:
        spans.append((t, total))
    out = []
    for a, b in spans:                       # no pause found: cut at a fixed length
        while b - a > max_span:
            out.append((a, a + max_span)); a += max_span
        out.append((a, b))
    return out

def transcribe_span(path, a, b, name):
    subprocess.run([FFMPEG, "-hide_banner", "-loglevel", "error", "-y", "-ss", f"{a:.3f}",
                    "-to", f"{b:.3f}", "-i", path, "-ar", "16000", "-ac", "1", name], check=True)
    with open(name, "rb") as f:
        return client.audio.transcriptions.create(model=MODEL, file=f, language="ar").text.strip()

def to_cues(text, a, b):
    """Wrap text into lines of <= MAX_CHARS, give each line a share of the span's time
    in proportion to its length, then pack lines into cues of <= MAX_LINES and <= MAX_CUE s."""
    lines, cur = [], ""
    for w in text.split():
        if cur and len(cur) + 1 + len(w) > MAX_CHARS:
            lines.append(cur); cur = w
        else:
            cur = f"{cur} {w}".strip()
    if cur:
        lines.append(cur)
    chars = sum(len(l) for l in lines) or 1
    cues, t = [], a
    for line in lines:
        d = (b - a) * len(line) / chars
        last = cues[-1] if cues else None
        if last and len(last[2]) < MAX_LINES and t + d - last[0] <= MAX_CUE:
            last[1] = t + d; last[2].append(line)
        else:
            cues.append([t, t + d, [line]])
        t += d
    for c in cues:                           # a long pause inside a span: don't hold text on screen
        c[1] = min(c[1], c[0] + MAX_CUE)
    return cues

def ts(x):
    ms = round(x * 1000)
    return f"{ms // 3600000:02}:{ms // 60000 % 60:02}:{ms // 1000 % 60:02},{ms % 1000:03}"

def make_srt(path, out="out.srt"):
    cues = []
    for i, (a, b) in enumerate(find_speech(path)):
        text = transcribe_span(path, a, b, f"chunk-{i:04}.wav")
        if text:
            cues += to_cues(text, a, b)
    with open(out, "w", encoding="utf-8") as f:
        for n, (a, b, g) in enumerate(cues, 1):
            cps = len(" ".join(g)) / (b - a)
            if b - a > MAX_CUE or cps > MAX_CPS:
                print(f"check cue {n}: {b - a:.1f} s, {cps:.0f} chars/s", file=sys.stderr)
            f.write(f"{n}\n{ts(a)} --> {ts(b)}\n" + "\n".join(g) + "\n\n")
    return len(cues)

if __name__ == "__main__":
    print(make_srt(sys.argv[1], sys.argv[2] if len(sys.argv) > 2 else "out.srt"), "cues written")
```

Run it with `BROADNET_API_KEY` set: `python make_srt.py episode.wav episode.srt`. On the test file, the pause detection found spans at 0 to 2.8 s, 3.6 to 7.6 s, 8.8 to 28.8 s (cut at 12 s because it had no pause) and 29.4 to 30.9 s, which matched how the file was built. The output parsed cleanly with the Python `srt` package and converted to WebVTT with FFmpeg.

Tune two values to your audio. `noise` is the level that counts as silence: try -30 to -40 dB for clean speech and higher for noisy rooms. `min_silence` is how long a gap must last: 0.3 to 0.5 seconds catches pauses between sentences without splitting every breath.

## How accurate is chunk-level timing?

Be clear about what this method can and can’t do.

-   **Span edges are the best part.** Caption starts and ends that fall on a real pause are as accurate as the silence detection. On our synthetic test file they matched exactly; real recordings with breaths and room noise are messier.
-   **Times inside a span are estimates.** When a span holds two or three captions, the script shares its time by character count. Speakers don’t talk at a constant rate, so those inner boundaries can be off by a second or more.
-   **Fixed cuts can split words.** When a span runs past the 12-second cap without a pause, the cut lands wherever it lands. A word at the cut may be lost or garbled. Raise `noise` or lower `min_silence` first, so fewer spans need a fixed cut.
-   **Short chunks give the model less context.** A 3-second clip has fewer words around each word than a 10-minute file. We have not measured how much this changes Arabic accuracy; test it on your own audio with [WER](https://broadrouter.com/blog/arabic-asr-wer-explained/).
-   **No speaker labels.** BroadNet returns no [diarization](https://broadrouter.com/glossary/diarization/), so captions don’t say who is speaking.
-   **Music and noise.** Background music can hide pauses entirely. Then most spans are fixed cuts, and timing gets worse.

For lectures, podcasts, webinars and training videos, captions within a second of the speech are usually readable. For drama, music videos or anything lip-synced, use a provider with word [timestamps](https://broadrouter.com/glossary/timestamps-asr/) or have a subtitler adjust the file.

## What does it cost, and how fast is it?

Price follows audio length. One hour of Arabic on BroadNet Transcribe Arabic costs $0.25, whether you send it as one file or 720 five-second ones. BroadNet’s pricing page lists a price per audio minute and no per-file minimum; check the usage page after your first episode to confirm.

Speed follows request count. A pay-as-you-go key allows 30 requests a minute and 4 in flight. An hour of speech split into 5-second spans is about 720 requests, which takes at least 720 ÷ 30 minutes. Longer spans mean fewer requests. If you hit 429, back off as in the [errors and retries guide](https://broadrouter.com/guides/errors-and-retries/), and don’t spread one job across keys to get around the published limits.

## Where BroadNet Inference fits

BroadNet Transcribe Arabic suits the text half of a subtitle job: Arabic speech to Arabic text at $0.0042 a minute, with audio and transcripts not retained after the request. The $5 starting credit covers transcription, so you can test the pipeline on real episodes before you top up. It does not return timestamps, segments, speaker labels or SRT. If your subtitles need word-level timing, use a provider that documents it, or align BroadNet’s text to the audio with a forced-alignment tool. Request shapes and limits are in the [BroadNet API reference](https://inference.broadnet.ai/docs?utm_source=broadrouter&utm_medium=referral&utm_campaign=blog-arabic-subtitles-srt-api&utm_content=body), and setup is in the [Arabic speech-to-text guide](https://broadrouter.com/guides/arabic-speech-to-text-api/).

Free tools for this

-   [Arabic token counter](https://broadrouter.com/tools/arabic-token-counter/) Arabic vs English token counts per tokenizer: the "Arabic tax" in tokens and money.
-   [Arabic text normalizer](https://broadrouter.com/tools/arabic-text-normalizer/) Tashkeel, tatweel, alef, ya, ta marbuta, digits and invisible characters, with a matching Python function.
-   [Speech-to-text cost calculator](https://broadrouter.com/tools/speech-to-text-cost-calculator/) Hours, calls or voice notes to a monthly transcription bill, against your current provider.

[All free tools](https://broadrouter.com/tools/)

## Terms in this article

[SRT subtitles](https://broadrouter.com/glossary/srt-subtitles/)

SRT (SubRip) is a plain-text subtitle format. Each caption is a sequence number, a start and end time written as hh:mm:ss,mmm --> hh:mm:ss,mmm, one or more lines of text, and a blank line. WebVTT is the similar web format used by HTML video.

[Speech-to-text](https://broadrouter.com/glossary/speech-to-text/)

Speech-to-text, also called automatic speech recognition (ASR), is technology that converts spoken audio into written text. A speech-to-text API accepts an audio file or stream and returns a transcript, usually priced per minute of audio. Accuracy is measured with word error rate and varies with accent, dialect and recording quality.

[Pay-as-you-go](https://broadrouter.com/glossary/pay-as-you-go/)

Pay-as-you-go is a pricing model in which you pay only for what you use, metered per unit such as tokens, requests or audio minutes, with no subscription or minimum commitment. Most LLM APIs bill this way, from a prepaid balance or a periodic invoice.

[Word error rate](https://broadrouter.com/glossary/word-error-rate/)

Word error rate (WER) is the standard accuracy measure for speech recognition: the number of word substitutions, deletions and insertions needed to turn a transcript into the correct reference, divided by the number of words in the reference. Lower is better.

[Modern Standard Arabic (MSA)](https://broadrouter.com/glossary/msa/)

Modern Standard Arabic (MSA) is the standardized form of Arabic used in writing, news, education and formal speech across the Arab world. It is nobody's native everyday language: people speak regional dialects such as Egyptian or Gulf Arabic and switch to MSA in formal settings.

[Rate limit](https://broadrouter.com/glossary/rate-limit/)

A rate limit is a cap an API places on how much a client can use it in a time window, such as requests per minute or tokens per minute. Requests over the limit are refused, usually with HTTP 429 Too Many Requests, until usage falls back under it.

[Speaker diarization](https://broadrouter.com/glossary/diarization/)

Speaker diarization is the task of dividing an audio recording into segments by speaker, answering "who spoke when". It labels each stretch of speech with an anonymous speaker ID such as SPEAKER\_00, and is usually combined with a transcript to show which person said each line.

[Timestamps (speech-to-text)](https://broadrouter.com/glossary/timestamps-asr/)

Timestamps in speech-to-text are start and end times, in seconds, attached to parts of a transcript. Segment timestamps cover a phrase or sentence; word timestamps cover each word. They are needed for subtitles, search inside recordings and aligning text with speakers.

## Questions

### Can I get an SRT file directly from BroadNet's transcription API?

No. BroadNet's docs show a JSON response with one text field, and no SRT, VTT or timestamp option. Its /v1/models metadata (checked 2026-11-15) lists json, text and verbose\_json response formats, but no source says verbose\_json carries timestamps. Build the timing yourself from chunk offsets, as in this post, or use a provider that documents timestamps.

### Which speech-to-text APIs export SRT for Arabic?

Among those we checked on 15 November 2026, AssemblyAI (a subtitles endpoint, Arabic on Universal-2) and Speechmatics (format=srt, Arabic and an Arabic-English pack) document SRT export. OpenAI documents SRT on whisper-1, which is deprecated. Deepgram documents caption libraries built on its timestamps.

### How many characters per line should Arabic subtitles have?

Netflix's Arabic Timed Text Style Guide sets 42 characters per line and a maximum of two lines. Its reading-speed limit for adult programmes is up to 20 characters per second, and 17 for children's programmes.

### How accurate are subtitles timed from audio chunks?

Each chunk's start and end are as accurate as the pause detection, so tune it on your audio. Captions inside a chunk get times estimated from text length, so they can drift by a second or more. That suits talks and podcasts, not lip-synced drama.

### Why does my Arabic SRT show punctuation on the wrong side?

SRT has no direction markup, so the player decides how to lay out right-to-left text. Test the file in the players your audience uses. If punctuation moves, try a format with richer styling or a player setting for RTL text.

### Does splitting audio into short chunks cost more?

BroadNet prices transcription per audio minute, so the total audio is the same. It does mean more requests: short chunks hit the pay-as-you-go limit of 30 requests a minute sooner. Check your usage page after a first run to confirm billing.

## Keep reading

-   [Transcribe long audio over 25 MB: split, send and stitch](https://broadrouter.com/blog/transcribe-long-audio-files-api/)
-   [Arabic speech-to-text API: how to choose one in 2026](https://broadrouter.com/blog/arabic-speech-to-text-api-buyers-guide/)
-   [Whisper API alternative: when to switch, and how to test one](https://broadrouter.com/blog/whisper-api-alternative/)
-   [Arabic meeting minutes from recordings: an API pipeline](https://broadrouter.com/blog/arabic-meeting-minutes-from-recordings/)
-   [Speech-to-text API pricing compared: price per minute in 2026](https://broadrouter.com/blog/speech-to-text-api-pricing-compared/)
-   [Add diacritics to Arabic text with an LLM: prompt, checks, DER](https://broadrouter.com/blog/arabic-diacritization-llm/)
-   [Arabic grammar and spelling correction with an LLM: a how-to](https://broadrouter.com/blog/arabic-grammar-spelling-correction-llm/)
-   [Guide: Arabic speech-to-text API, step by step](https://broadrouter.com/guides/arabic-speech-to-text-api/)
-   [Guide: BroadNet Inference error codes and when to retry](https://broadrouter.com/guides/errors-and-retries/)

Try it on your real workload. New accounts start with $5 of credit for Gemma and transcription. DeepSeek, GLM and Qwen3.8 need a top-up.

[Get started](https://inference.broadnet.ai/account/?utm_source=broadrouter&utm_medium=referral&utm_campaign=blog-arabic-subtitles-srt-api&utm_content=page-cta) ·

**Sources**

-   [BroadNet Inference API reference: transcription request and {"text": ...} response, pay-as-you-go limits (checked 2026-11-15)](https://inference.broadnet.ai/docs?utm_source=broadrouter&utm_medium=referral&utm_campaign=blog-arabic-subtitles-srt-api&utm_content=sources)
-   [Library of Congress, Sustainability of Digital Formats: SubRip (SRT) format description fdd000569 (checked 2026-11-15)](https://www.loc.gov/preservation/digital/formats/fdd/fdd000569.shtml)
-   [Netflix Partner Help Center, Arabic Timed Text Style Guide: 42 characters per line, reading speed limits (checked 2026-11-15)](https://partnerhelp.netflixstudios.com/hc/en-us/articles/215517947)
-   [Netflix Partner Help Center, Timed Text Style Guide: General Requirements, minimum and maximum duration (checked 2026-11-15)](https://partnerhelp.netflixstudios.com/hc/en-us/articles/215758617-Timed-Text-Style-Guide-General-Requirements)
-   [OpenAI API reference, create transcription: response\_format and timestamp\_granularities by model (checked 2026-11-15)](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create)
-   [OpenAI speech to text guide: timestamp\_granularities only on whisper-1, deprecation date (checked 2026-11-15)](https://developers.openai.com/api/docs/guides/speech-to-text)
-   [OpenAI deprecations: whisper-1 and the gpt-4o transcribe models shut down February 26, 2027; replacement gpt-transcribe or gpt-live-transcribe (checked 2026-11-15)](https://developers.openai.com/api/docs/deprecations)
-   [AssemblyAI API reference, Get subtitles: the transcript subtitles endpoint, SRT or VTT format (checked 2026-11-15)](https://www.assemblyai.com/docs/api-reference/transcripts/get-subtitles)
-   [AssemblyAI, supported languages for pre-recorded audio (checked 2026-11-15)](https://www.assemblyai.com/docs/pre-recorded-audio/supported-languages)
-   [Speechmatics docs, batch output formats: format=srt and srt\_overrides (checked 2026-11-15)](https://docs.speechmatics.com/speech-to-text/batch/output)
-   [Speechmatics docs, supported languages: Arabic and the ar\_en bilingual pack (checked 2026-11-15)](https://docs.speechmatics.com/speech-to-text/languages)
-   [Deepgram docs, automatically generating WebVTT and SRT captions (checked 2026-11-15)](https://developers.deepgram.com/docs/automatically-generating-webvtt-and-srt-captions)
-   [Deepgram docs, models and languages overview: Arabic on Nova-3 (checked 2026-11-15)](https://developers.deepgram.com/docs/models-languages-overview)
-   [ElevenLabs API reference, speech to text: timestamps\_granularity and word start/end (checked 2026-11-15)](https://elevenlabs.io/docs/api-reference/speech-to-text/convert)
-   [FFmpeg filters documentation: silencedetect and whisper filters (checked 2026-11-15)](https://ffmpeg.org/ffmpeg-filters.html)
