Most speech-to-text APIs take one file of about 25 MB per request. BroadNet Inference takes WAV or MP3 up to 26,214,400 bytes. A long meeting, lecture or podcast blows past that, and the request fails with 413. The fix has four steps: shrink the file, split it at silences, send the pieces in parallel, and stitch the text back together.
Why does a long recording fail?
The limit is on bytes, not on minutes. How many minutes fit depends on the format:
| Format | Bytes per second | Fits in 26,214,400 bytes |
|---|---|---|
| WAV, 44.1 kHz stereo, 16-bit | 176,400 | About 2.5 minutes |
| WAV, 16 kHz mono, 16-bit | 32,000 | About 13.6 minutes |
| MP3, 64 kbit/s | 8,000 | About 54 minutes |
| MP3, 32 kbit/s | 4,000 | About 109 minutes |
These are simple sums: bytes per second times seconds. A phone or laptop recording is often 44.1 or 48 kHz stereo, which fills the limit in a few minutes. Speech does not need that. Converting to 16 kHz mono first is the biggest single win.
When a file is still too large, the API rejects it outright. On BroadNet the response is 413, “the request exceeds the endpoint byte or text limit”, and nothing is transcribed. See the error code guide.
Step 1: how do you shrink the file?
Convert to 16 kHz mono before anything else. One ffmpeg command does it:
ffmpeg -i meeting.m4a -ac 1 -ar 16000 meeting.wav
For BroadNet, the output must be WAV (audio/wav) or MP3 (audio/mpeg). Formats such as .m4a, .ogg and .webm need converting anyway, so do the resampling in the same step.
Should you pick WAV or MP3? WAV is lossless, so nothing is lost, but it fills the limit in about 13 minutes. MP3 fits four times more audio per request at 64 kbit/s, but it is lossy. If you use MP3, run a short test: transcribe the same five minutes as WAV and as MP3 and compare the text. The sample rate entry explains why 16 kHz is enough for speech.
Step 2: how do you split audio without cutting words?
Split by time, never by bytes. A cut at a byte offset can land in the middle of an audio frame, and the file will not decode. A cut at a fixed time can land in the middle of a word. OpenAI’s own guide warns against splitting mid-sentence because it “can remove context and reduce accuracy”.
The reliable method is to cut inside a silence near your target length. To get ready-made commands for your file size and duration, use the free audio splitter command builder. By hand, it works like this:
- Run ffmpeg’s silencedetect filter to list the silent gaps.
- Walk through the recording. When a chunk reaches about 10 minutes, cut at the next silence.
- Cut each chunk with ffmpeg, from one cut point to the next.
Ten minutes of 16 kHz mono WAV is 19.2 MB, which leaves room under the limit. If a speaker talks for a long time without a pause, the script below cuts at the hard maximum instead.
ffmpeg’s segment muxer can also split a file into pieces “of nearly fixed duration” with one command. It is quick, but it does not look for silence, so use it only when a lost word at each boundary is acceptable, or add overlap (below).
What does the full script look like?
This Python script converts, splits at silences, sends up to four chunks at once and joins the text. It uses the OpenAI SDK pointed at BroadNet Inference.
# pip install openai
import os, re, subprocess, tempfile
from concurrent.futures import ThreadPoolExecutor
from openai import OpenAI
client = OpenAI(base_url="https://inference.broadnet.ai/v1", api_key=os.environ["BROADNET_API_KEY"])
TARGET, HARD_MAX = 600, 750 # seconds: aim for 10 min, never above 12.5 min
def run(*args):
return subprocess.run(args, capture_output=True, text=True, check=True)
def silences(path):
"""Midpoints (in seconds) of silent gaps of 0.5 s or more."""
out = run("ffmpeg", "-i", path, "-af", "silencedetect=noise=-35dB:d=0.5",
"-f", "null", "-").stderr
starts = [float(x) for x in re.findall(r"silence_start: ([\d.]+)", out)]
ends = [float(x) for x in re.findall(r"silence_end: ([\d.]+)", out)]
return [(s + e) / 2 for s, e in zip(starts, ends)]
def duration(path):
return float(run("ffprobe", "-v", "error", "-show_entries", "format=duration",
"-of", "csv=p=0", path).stdout)
def cut_points(path):
total, gaps, cuts, last = duration(path), silences(path), [0.0], 0.0
while total - last > HARD_MAX:
ok = [g for g in gaps if last + TARGET <= g <= last + HARD_MAX]
last = ok[0] if ok else last + HARD_MAX # no silence: hard cut
cuts.append(last)
return cuts + [total]
def transcribe(chunk):
with open(chunk, "rb") as f:
return client.audio.transcriptions.create(
model="broadnet/cohere-transcribe-arabic", file=f, language="ar").text
def transcribe_long(src):
with tempfile.TemporaryDirectory() as tmp:
wav = os.path.join(tmp, "full.wav")
run("ffmpeg", "-y", "-i", src, "-ac", "1", "-ar", "16000", wav)
cuts, chunks = cut_points(wav), []
for i, (a, b) in enumerate(zip(cuts, cuts[1:])):
out = os.path.join(tmp, f"part{i:03d}.wav")
run("ffmpeg", "-y", "-i", wav, "-ss", str(a), "-to", str(b), out)
chunks.append(out)
with ThreadPoolExecutor(max_workers=4) as pool: # map() keeps order
return "\n".join(pool.map(transcribe, chunks))
print(transcribe_long("meeting.m4a"))
Notes on the script:
- Language. BroadNet’s docs say to always send
language; without it, Arabic “can otherwise be transliterated into Latin letters”. Usebroadnet/cohere-transcribewith the right language code for English, French or any of its other supported languages. - Thresholds.
-35dBand0.5seconds suit a quiet room. Noisy rooms need a higher noise value, such as-30dB. Print the cut points once and check them. - Order.
pool.mapreturns results in input order, so the text joins in the right sequence even though chunks finish at different times.
How many chunks can you send at once?
As many as your key allows. A BroadNet pay-as-you-go key allows 4 requests in flight and 30 requests a minute, which is why the script uses four workers. A fifth request at the same time gets 429. Retry 429 and 5xx responses with exponential backoff; do not retry 413, because the same file will fail again. How to handle 429 errors has a retry helper you can wrap around transcribe().
With four workers, a two-hour recording in 10-minute chunks becomes 12 requests in three waves. Total time is roughly three chunk round-trips, not twelve.
Do you need overlap between chunks?
Not if you cut inside silences: there is no speech at the boundary to lose. Overlap is for fixed-time cuts. Start each chunk a second or two before the previous one ended, then remove the repeated words when you join the text. The usual way is to compare the last few words of one chunk with the first few of the next and drop the match.
Overlap costs a little. Two seconds per 10-minute chunk adds about 0.3% to the audio you pay for.
Can the next chunk use the previous chunk’s text as context?
Some APIs allow it. OpenAI lists “carrying context from a previous chunk of a longer recording” as a use of its prompt parameter. BroadNet’s API reference lists only model, language and file for transcription, and returns JSON with a text field. So on BroadNet, treat each chunk as independent, and fix names and terms afterwards. One cheap fix is to send the joined transcript to a chat model with a list of correct spellings for people, products and places.
What does a long file cost?
Speech to text bills per audio minute, so splitting does not change the total. At BroadNet’s published rates:
| Audio | BroadNet Transcribe Arabic | BroadNet Transcribe (14 languages) |
|---|---|---|
| Price per minute | $0.0042 | $0.002 |
| One hour | $0.25 | $0.12 |
| 1,000 hours | $252.00 | $120.00 |
The pricing page lists a price per audio minute and says nothing about a per-file minimum or rounding. Check your usage page after the first batch to confirm the total matches the audio length. Both transcription models are available on the free starting credit of $5, which covers about 1,190 minutes of Arabic. To price your own volume, use the speech-to-text cost calculator; to compare providers, see the speech-to-text API price dataset.
What mistakes should you avoid?
- Sending the original file. A 48 kHz stereo WAV is six times bigger than it needs to be.
- Cutting at byte offsets. The chunk will not decode, or the first second will be noise.
- Chunks right at the limit. A 25.9 MB chunk passes today and fails when a recording is a little louder. Leave headroom.
- Unbounded parallelism. Firing 50 chunks at once gets most of them a 429. Cap workers at the key’s in-flight limit.
- Forgetting the language. Each chunk is a separate request, so each one needs
language.
When is chunking the wrong tool?
If you need speaker labels or word timestamps, chunking a plain-text API will not give them to you. BroadNet’s transcription response is text only. Providers that return diarization and timestamps also handle long files more directly; the Arabic speech-to-text buyer’s guide compares them. For stereo call recordings, split by channel instead of by time: the call center pipeline shows how.
Where BroadNet Inference fits
BroadNet Transcribe Arabic is priced at $0.0042 a minute, and BroadNet reports it #2 of 37 (its September 2026 figure; the live board listed it #4 of 39 on 15 November 2026) on the Open Universal Arabic ASR Leaderboard. Audio and transcripts are not retained after the request. It suits batch transcription of long Arabic recordings once you split them as above. It does not suit you if you need timestamps, speaker labels or live streaming in the same API. The Arabic speech-to-text guide covers the first request; this post covers the files that are too big for one.
