Skip to main content

create-simli-app-openai

A Next.js app that talks to OpenAI’s Realtime API from the browser and speaks the answers through a Simli avatar.
The page sends your microphone to the OpenAI Realtime API with OpenAI’s realtime beta client library, and plays the voice that comes back through the avatar with the JavaScript SDK. To run it, rename .env_sample to .env and paste in your Simli and OpenAI API keys, then run npm install and npm run dev. Change the avatar’s name, face and prompt in app/page.tsx. The README has the details.
This starter is a local demo. Both API keys are in NEXT_PUBLIC_ variables, so anyone who opens the page can read them, and OpenAI has deprecated the realtime beta library it uses. To build an OpenAI agent you can deploy, see LiveKit.