{"id":23590747,"url":"https://github.com/cameronking4/openai-realtime-api-nextjs","last_synced_at":"2025-05-16T12:07:55.785Z","repository":{"id":268797910,"uuid":"905501259","full_name":"cameronking4/openai-realtime-api-nextjs","owner":"cameronking4","description":"Leverage the OpenAI Realtime API (12-17-2024) with this Next.js 15 starter template featuring shadcn/ui components, tool-calling \u0026 localization. Use starter to build Voice AI apps with WebRTC.","archived":false,"fork":false,"pushed_at":"2025-04-12T00:51:15.000Z","size":33924,"stargazers_count":331,"open_issues_count":5,"forks_count":65,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-12T01:37:02.826Z","etag":null,"topics":["deno","gpt4o-realtime-api","nextjs","openai","openai-realtime-api","realtime-api","shadcn","shadcn-ui","voice-ai","webrtc"],"latest_commit_sha":null,"homepage":"https://openai-rt-shadcn.vercel.app/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cameronking4.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-19T00:44:31.000Z","updated_at":"2025-04-12T00:51:20.000Z","dependencies_parsed_at":"2025-01-17T14:23:19.137Z","dependency_job_id":null,"html_url":"https://github.com/cameronking4/openai-realtime-api-nextjs","commit_stats":null,"previous_names":["cameronking4/shadcn-openai-realtime-webrtc","cameronking4/shadcn-openai-realtime-api","cameronking4/openai-realtime-api-nextjs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cameronking4%2Fopenai-realtime-api-nextjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cameronking4%2Fopenai-realtime-api-nextjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cameronking4%2Fopenai-realtime-api-nextjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cameronking4%2Fopenai-realtime-api-nextjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cameronking4","download_url":"https://codeload.github.com/cameronking4/openai-realtime-api-nextjs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248544039,"owners_count":21121882,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deno","gpt4o-realtime-api","nextjs","openai","openai-realtime-api","realtime-api","shadcn","shadcn-ui","voice-ai","webrtc"],"created_at":"2024-12-27T07:14:57.633Z","updated_at":"2025-04-12T09:21:42.873Z","avatar_url":"https://github.com/cameronking4.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# OpenAI WebRTC Shadcn Next15 Starter\nThis is a WebRTC-based Voice AI stream application using `OpenAI`'s `Realtime API` and `WebRTC`. Project contains `/api` route and UI components developed with `Next.js` and `shadcn/ui`. It supports real-time audio conversations implented in [skrivov/openai-voice-webrtc-next](https://github.com/skrivov/openai-voice-webrtc-next) with the addition of a hook to abstract the WebRTC handling.\n\nhttps://github.com/user-attachments/assets/ea9324af-5c18-48d2-b980-2b81baeea4c0\n\n## Features\n- **Next.js Framework**: Built with Next.js for server-side rendering and API routes.\n- **Modern UI**: Animated using Tailwind CSS \u0026 Framer Motion \u0026 shadcn/ui.\n- **Use-WebRTC Hook**: A hook to abstract the OpenAI WebRTC handling.\n- **Tool Calling**: 6 example functions to demonstrate client side tools along with Realtime API: `getCurrentTime`, `partyMode`, `changeBackground`, `launchWebsite`, `copyToClipboard`, `scrapeWebsite` (requires FireCrawl API key)\n- **Localization**: Select language for app strings and the voice agent (English, Spanish, French, Chinese)\n- **Type Safety**: TypeScript with strict eslint rules (optional)\n\n  \n## Requirements\n- **Deno runtime** or **Node.js**\n- OpenAI API Key or Azure OpenAI API Key in `.env` file\n\n## Installation\n\n### 1. Clone the Repository\n```bash\ngit clone https://github.com/cameronking4/openai-realtime-api-nextjs.git\ncd openai-realtime-api-nextjs\n```\n\n### 2. Environment Setup\nCreate a `.env` file in the root directory:\n```env\nOPENAI_API_KEY=your-openai-api-key\n```\n\n### 3. Install Dependencies\nIf using **Node.js**:\n```bash\nnpm install\n```\n\nIf using **Deno**:\n```bash\ndeno install\n```\n\n### 4. Run the Application\n\n#### Using Node.js:\n```bash\nnpm run dev\n```\n\n#### Using Deno:\n```bash\ndeno task start\n```\n\nThe application will be available at `http://localhost:3000`.\n\n## Usage\n1. Open the app in your browser: `http://localhost:3000`.\n3. Select a voice and start the audio session.\n\n## Deploy to Vercel\n**Deploy in one-click**\n\n[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fcameronking4%2Fopenai-realtime-api-nextjs\u0026env=OPENAI_API_KEY\u0026envDescription=OpenAI%20Key%20(Realtime%20API%20Beta%20access)\u0026envLink=https%3A%2F%2Fplatform.openai.com%2Fapi-keys\u0026project-name=openai-rt-shadcn\u0026repository-name=openai-realtime-api-nextjs-clone\u0026demo-title=OpenAI%20Realtime%20API%20(WebRTC)%20x%20shadcn%2Fui\u0026demo-description=Next.js%2015%20template%20to%20create%20beautiful%20Voice%20AI%20applications%20with%20OpenAI%20Realtime%20API%20Beta\u0026demo-url=https%3A%2F%2Fopenai-rt-shadcn.vercel.app\u0026demo-image=http%3A%2F%2Fopenai-rt-shadcn.vercel.app%2Fdemo.gif)\n\n## License\nThis project is licensed under the MIT License. See the `LICENSE` file for details.\n\n## Acknowledgements\n- [OpenAI](https://openai.com/) for their API and models.\n- [Next.js](https://nextjs.org/) for the framework.\n- [Tailwind CSS](https://tailwindcss.com/) for styling.\n- [Simon Willison’s Weblog](https://simonwillison.net/2024/Dec/17/openai-webrtc/) for inspiration\n- [Originator: skrivov](https://github.com/skrivov/openai-voice-webrtc-next) for the WebRTC and Nextjs implementation\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcameronking4%2Fopenai-realtime-api-nextjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcameronking4%2Fopenai-realtime-api-nextjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcameronking4%2Fopenai-realtime-api-nextjs/lists"}