OpenAI Voice Assistant
Extensible voice assistant template built with the Realtime API and FastAPI
server
pietz/openai-voice-assistant
Just deployed
A template for building real-time voice assistants using OpenAI's realtime API. This project provides a foundation for creating web-based voice interfaces that can process speech in real-time and respond with both voice and text.
It uses the new WebRTC API from OpenAI and a FastAPI server to authenticate the client and handle tool calls. An example tool call to retrieve the current weather is included.
It uses a JavaScript helper library that simplifies the usage in the frontend and pulls tool signatures directly from the OpenAPI definition.
Works best in Chrome, Edge and Safari. Firefox WebRTC performance is not great at the moment.
Template Content
OPENAI_API_KEY
Your secret OpenAI API key