How ScribeToAny Runs Whisper GPU Jobs on Modal via Cloudflare Workers
A developer building ScribeToAny, a transcription web app, solved a fundamental incompatibility between Cloudflare Workers and Modal's GPU infrastructure by treating Modal as an HTTP endpoint rather than a Python SDK. Since Workers cannot sustain long-running GPU jobs or open gRPC connections, the architecture was redesigned so the browser uploads media directly to Cloudflare R2, bypassing the Worker entirely. The Worker's role is limited to three fast operations: presigning upload and download URLs, writing a job record to the database, and firing a single POST to Modal's web endpoint to spawn the transcription job. Once the GPU finishes processing, Modal sends a signed webhook callback to the Worker, which updates the job status so the frontend can reflect completion. The design also accounts for real-world edge cases such as abandoned uploads, duplicate webhook deliveries, and lost callbacks through atomic database guards and scheduled cron sweeps.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in