New Tool Radar

Local AI

How to Split a Long Recording with ffmpeg and Transcribe Each Part with Whisper

Split a long recording into 10-minute parts with ffmpeg's segment muxer, then run Whisper on each part and join the transcripts in order.

Schematic diagram with three steps: split a long recording into 10-minute parts with ffmpeg, transcribe each part with Whisper, then join the part transcripts in order.

Whisper can transcribe a long recording in one go — its transcribe() method reads the whole file and processes the audio with a sliding 30-second window — but working in parts has practical advantages: if one part fails you redo only that part, and each transcript stays small enough to read and check. Split the recording with ffmpeg first, transcribe the parts, then join the part transcripts in order.

Split the recording into 10-minute parts

Use ffmpeg’s segment muxer. This command cuts long-talk.wav into 600-second parts without re-encoding:

ffmpeg -i long-talk.wav -f segment -segment_time 600 -reset_timestamps 1 -c copy long-talk_%03d.wav

Each flag comes from FFmpeg’s own segment-muxer documentation: -f segment selects the segment muxer; -segment_time sets the segment duration in seconds (the default is 2, so 600 overrides it); -reset_timestamps 1 resets timestamps at the beginning of each segment so every part starts near zero instead of keeping its position in the original recording (the default is 0); -c copy copies the audio without re-encoding. The %03d pattern numbers the parts, and the first part is long-talk_000.wav because the segment sequence number starts at 0 by default. A 25-minute recording gives three parts: two of 10 minutes and a last one of about 5 minutes.

Transcribe each part, then join the transcripts

Whisper’s command line accepts several audio files in one command, as its README shows:

whisper long-talk_000.wav long-talk_001.wav long-talk_002.wav --model base

With many parts, a loop is easier:

for f in long-talk_*.wav; do whisper "$f" --model base; done

Whisper writes a transcript file for each part — by default it produces all output formats, including plain .txt — so each part gets its own .txt next to it. Join them in filename order, which is also part order:

cat long-talk_*.txt > long-talk-full.txt
Check What you should see If you do not see it
Parts ls long-talk_*.wav lists long-talk_000.wav, long-talk_001.wav, long-talk_002.wav for a 25-minute recording The split command failed — read its error output before retrying
Timestamps Playing long-talk_001.wav starts at its own beginning, not 10 minutes in -reset_timestamps 1 was missing — split again with it
Transcripts A .txt file sits next to each part That part’s Whisper run failed — run it again on its own
Joined long-talk-full.txt reads from the start of the recording to the end The parts were joined out of order — check the filenames sort as 000, 001, 002

Expected result. We checked FFmpeg’s own segment-muxer documentation for -f segment, -segment_time, -reset_timestamps, and the %03d numbering, and OpenAI Whisper’s README for the multi-file command, the 30-second sliding window, and the ffmpeg requirement. We did not run ffmpeg or Whisper.

Limits

FFmpeg’s documentation warns that splitting may not be accurate unless you force the reference stream key-frames at the given time, so treat the 10-minute length as a target rather than an exact cut. A cut can fall in the middle of a sentence, so a word at a boundary may be split across two part transcripts — read the join across the boundary rather than trusting either half alone. The last part is shorter than the rest, which is normal. Each part is transcribed on its own, so Whisper cannot use words from a later part to fix an earlier one. We did not run ffmpeg or Whisper, so no file here is a recorded result.

Sources

See all