Create and edit images using your voice.
Kontext Realtime — Edit Images with Your Voice
A real-time voice-to-image app that uses OpenAI’s Realtime API for voice input and Replicate for image generation, hosted on Cloudflare Workers.
About Kontext Realtime
Kontext Realtime lets you create and edit images by speaking. Talk to the app, describe what you want, and it generates or modifies images in real time. Say “make the sky purple” and the image updates. Say “add a cat in the foreground” and it does.
The app connects your microphone to OpenAI’s Realtime API via WebRTC for voice-to-text with function calling. When the AI detects an image generation or editing intent, it calls Replicate’s Flux Schnell (for generation) or Flux Kontext Pro (for editing). The result renders in the browser as soon as the model finishes.
Frameworks & Technologies Used
- Frontend: React with Tailwind CSS (image display and voice controls)
- Backend: Cloudflare Workers with Hono (API proxy and static serving)
- Voice: OpenAI Realtime API via WebRTC (speech-to-text with function calling)
- AI Models: Replicate (Flux Schnell for generation, Flux Kontext Pro for editing)
Why Cloudflare for This Project?
- Workers as API Proxy: The Worker handles auth and proxies requests between the browser, OpenAI, and Replicate. API keys stay server-side while the browser handles voice input and image display.
- Low-Latency Edge Delivery: Voice-driven image editing is latency-sensitive. Workers run close to the user, keeping the round trip between voice input and API calls short.
- Simple Deployment: One
npm run deploypushes the entire app to Cloudflare. No containers, no build servers.