Cloudflare

Introducing Stream Generated Captions, powered by Workers AI

Jun 20, 2024Mickie Betz, Ben Krebsbach, Taylor Smith
Introducing Stream Generated Captions, powered by Workers AI
SummaryAI, from the source post

This post details the integration of the Whisper model via Cloudflare Workers AI to provide automatic caption generation for Cloudflare Stream. It describes the pre-processing steps to format audio into 30-second batches compatible with Whisper, the parallelization of requests to Workers AI, and the re-ordering of out-of-order responses to ensure sequential caption alignment. The technical implementation uses a simple Worker script to call the `ai.run` function with the Whisper model.

More from the Artificial Intelligence Integration & Impact trail