For Cloudflare Workers' file size limitations, a chunking scheme is available:
- preprocessing segmentation: Split audio into 1MB segments using tools such as FFmpeg (WAV format recommended).
- Upload in batches: commit block by block by calling the API in a round-robin fashion, recording the start/end timestamps of each block
- Consolidation of results: Re-assembles the returned segments of JSON data by timestamp, or uses the
cat file1.srt file2.srt > full.srt
merge subtitles
Take care to keep the sampling rate consistent to avoid misaligned timelines.
This answer comes from the articleWhisper on Cloudflare AI: a free tool to convert audio to text and generate subtitlesThe