Un experimento rápido: translating Cloudflare Stream captions with Workers AI
Dec 24, 2024Taylor Smith

Summary
This post details an experiment using Cloudflare Workers AI and the m2m100-1.2b translation model to translate automatically generated VTT captions for Cloudflare Stream videos. It describes the process of parsing VTT files, running translation inference calls in parallel using `Promise.all`, and re-exporting the translated captions back to VTT format. The post highlights the impact of fragmented input text on translation quality and demonstrates an improvement by implementing a pre-processing step to consolidate caption cues into full sentences before translation. It also notes the rapid development cycle possible with Workers AI and the need for language expertise to evaluate translation quality.
More from the Artificial Intelligence Integration & Impact trail
- Introducing Clef-omni with full multimodality, plus a faster Clef and a cheaper Clef-flash
- Introducing Web Search API via AI Gateway
- Introducing Clef: our open-source decision models, and new RL fine-tuning platform
- One year later: Sovereign AI and the fight for choice
- AI Search is now generally available