Typed client for OpenAI's realtime voice API
Top 80.8% on sourcepulse
This project provides a TypeScript client for OpenAI's real-time voice API, offering a strongly-typed, drop-in replacement for OpenAI's official JavaScript version. It addresses common bugs and inconsistencies, enhancing stability and developer experience for those building real-time voice applications with OpenAI.
How It Works
The client leverages WebSocket connections to interact with OpenAI's real-time API. It provides a typed interface for all events and handlers, ensuring type safety and reducing runtime errors. The architecture supports Node.js, browser, Deno, Bun, and Cloudflare Workers, with a focus on compatibility and ease of use.
Quick Start & Requirements
npm install openai-realtime-api
Highlighted Details
Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
The RealtimeClient
can accept an API key directly in the browser with dangerouslyAllowAPIKeyInBrowser: true
, but this is strongly discouraged for production environments due to security risks.
2 weeks ago
1 week