Skip to content

A real-time demo app using OpenAI, Replicate, and Cloudflare that lets you run functions in your browser using your voice.

Notifications You must be signed in to change notification settings

replicate/getting-started-openai-realtime

Repository files navigation

Getting started with the OpenAI Realtime API

This is a real-time demo app that lets you run functions in your browser using your voice.

It's powered by OpenAI's Realtime API over WebRTC, runs on Cloudflare Workers, and uses Replicate models to generate images.

Check out the guide to running this app: replicate.com/docs/guides/openai-realtime

screenshot

Prerequisites

Here's what you'll need to build this project:

Development

Copy .dev.vars.example to .dev.vars:

cp .dev.vars.example .dev.vars

Edit .dev.vars and add your OpenAI API key and Replicate API token:

OPENAI_API_KEY=...
REPLICATE_API_TOKEN=...

Install dependencies

npm install

Run local server

npm run dev

Deploy

Upload your secrets

npx wrangler secret put OPENAI_API_KEY
npx wrangler secret put REPLICATE_API_TOKEN
npm run deploy

About

A real-time demo app using OpenAI, Replicate, and Cloudflare that lets you run functions in your browser using your voice.

Resources

Stars

Watchers

Forks