{"id":49958726,"url":"https://github.com/render-examples/voice-agent-template","last_synced_at":"2026-05-18T01:09:39.209Z","repository":{"id":340255229,"uuid":"1109349554","full_name":"render-examples/voice-agent-template","owner":"render-examples","description":null,"archived":false,"fork":false,"pushed_at":"2026-02-24T00:03:56.000Z","size":123,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-24T07:11:32.730Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/render-examples.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-03T17:21:22.000Z","updated_at":"2026-02-24T00:01:10.000Z","dependencies_parsed_at":"2026-02-24T07:12:15.867Z","dependency_job_id":null,"html_url":"https://github.com/render-examples/voice-agent-template","commit_stats":null,"previous_names":["render-examples/voice-agent-template"],"tags_count":null,"template":true,"template_full_name":null,"purl":"pkg:github/render-examples/voice-agent-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/render-examples%2Fvoice-agent-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/render-examples%2Fvoice-agent-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/render-examples%2Fvoice-agent-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/render-examples%2Fvoice-agent-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/render-examples","download_url":"https://codeload.github.com/render-examples/voice-agent-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/render-examples%2Fvoice-agent-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33161411,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T22:39:12.733Z","status":"ssl_error","status_checked_at":"2026-05-17T22:39:10.741Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-05-18T01:09:38.406Z","updated_at":"2026-05-18T01:09:39.204Z","avatar_url":"https://github.com/render-examples.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LiveKit Voice Agent with Next.js\n\nA full-stack voice AI application built with [LiveKit Agents](https://docs.livekit.io/agents), [Next.js](https://nextjs.org), and [Rime TTS](https://rime.ai/). Real-time voice conversations powered by GPT-5.2, with high-quality TTS and advanced speech recognition.\n\n**Deploy to production on [Render](https://render.com) with auto-scaling. Develop locally with Docker.**\n\n- [Deploy to Production (Render)](#-deploy-to-render)\n- [Features](#-features)\n- [Repository Structure](#-repository-structure)\n- [Local Development with Docker](#-quick-start-with-docker)\n- [Local Docker Commands](#-docker-commands)\n- [Customization](#-customization)\n- [Environment Variables](#-environment-variables)\n- [Troubleshooting](#-troubleshooting)\n- [Additional Documentation](#-additional-documentation)\n- [Contributing](#-contributing)\n- [License](#-license)\n\n## 🚀 Deploy to Production (Render)\n\nThis project is pre-configured for production deployment to [Render](https://render.com/) using the included `render.yaml` blueprint.\n\n**What you get:**\n- ✅ Next.js web app with voice UI\n- ✅ LiveKit voice agent service\n- ✅ Auto-scaling and health checks\n- ✅ Separate app and agent services\n- ✅ Environment variable management\n\n**Deployment steps:**\n\n1. **Fork this repository to your GitHub account**\n\n2. **Set up LiveKit Cloud:**\n   - Sign up at [LiveKit Cloud](https://cloud.livekit.io/)\n   - Create a new project\n   - Get your API key, secret, and WebSocket URL\n\n3. **Create environment variable group on Render:**\n   - Go to [Render Dashboard](https://dashboard.render.com)\n   - Create an environment group with these variables:\n     - `LIVEKIT_API_KEY` - Your LiveKit API key\n     - `LIVEKIT_API_SECRET` - Your LiveKit API secret\n     - `LIVEKIT_URL` - Your LiveKit WebSocket URL\n     - `RIME_API_KEY` - Get from [Rime.ai](https://rime.ai/)\n     - *(LLM and STT use LiveKit Inference—billed via LiveKit Cloud—so OpenAI and AssemblyAI keys are not required.)*\n\n4. **Create a new Blueprint Instance on Render:**\n   - Click \"New\" → \"Blueprint Instance\"\n   - Connect your forked repository\n   - Select branch (usually `main`)\n   - Select the environment group you created\n\n5. **Deploy:**\n   - Click \"Apply\" to create all services\n   - Render will:\n     - Build and deploy Next.js app\n     - Build and deploy LiveKit agent\n     - Link services together\n\n6. **Access your deployed app:**\n   - Web App: `https://your-app-name.onrender.com`\n   - Agent will auto-connect via LiveKit Cloud\n\n**Important: Agent Resource Requirements**\n\n⚠️ **The agent service requires at least 8 GB of RAM** to load AI models (VAD, turn detection).\n\nOn Render, use the **Standard plan or higher** for the agent worker service. The included `render.yaml` is already configured with auto-scaling and health checks for production workloads.\n\n## ✨ Features\n\n- 🎙️ **Real-time Voice Conversations** - Natural voice interactions powered by LiveKit\n- 🧠 **Smart AI Agent** - Uses GPT-5.2 for intelligent responses\n- 🗣️ **High-Quality TTS** - Rime TTS with multiple voice options\n- 🎧 **Advanced STT** - AssemblyAI for accurate speech recognition\n- 🔇 **Noise Cancellation** - Built-in background noise reduction\n- 🚀 **Production-Ready Deployment** - Pre-configured for Render with auto-scaling and Docker\n\n## 📁 Repository Structure\n\n```\nrender-voice-agent/\n├── agent/                  # LiveKit voice agent\n│   ├── agent.ts            # Agent implementation (GPT-5.2 + Rime + AssemblyAI via LiveKit Inference)\n│   ├── AGENT_README.md    # Agent configuration and customization\n│   ├── Dockerfile         # Production agent container\n│   └── Dockerfile.dev     # Development agent container\n├── app/                   # Next.js application\n│   ├── api/              # API routes (LiveKit token generation)\n│   ├── components/       # React components\n│   │   └── VoiceAgent.tsx # Voice UI component\n│   ├── page.tsx          # Main application page\n│   └── globals.css       # Global styles\n├── docker-compose.yml     # Full-stack local development (app + agent)\n├── render.yaml           # Production deployment configuration (Render.com)\n├── package.json          # Dependencies and scripts\n└── README.md\n```\n\n## 💻 Local Development with Docker\n\n**Requirements for local development:**\n- Docker \u0026 Docker Compose\n- **At least 8 GB of RAM** available for the agent (for AI model loading)\n- Node.js 20 or higher (optional, for running without Docker)\n- LiveKit Cloud account ([sign up](https://cloud.livekit.io/))\n- Rime API key for TTS (LLM and STT use LiveKit Inference; no OpenAI or AssemblyAI keys needed)\n\n**Local setup:**\n\n1. **Clone the repository:**\n\n```bash\ngit clone \u003cyour-repo-url\u003e\ncd render-voice-agent\n```\n\n2. **Set up LiveKit Cloud credentials:**\n\n```bash\n# Authenticate with LiveKit Cloud\nlk cloud auth\n\n# Generate credentials and save to .env\nlk app env -w\n```\n\nThis creates a `.env` file with:\n```env\nLIVEKIT_API_KEY=...\nLIVEKIT_API_SECRET=...\nLIVEKIT_URL=wss://...\n```\n\n3. **Add additional API key to `.env`:**\n\n```env\nRIME_API_KEY=your-rime-api-key\n```\n\n4. **Start all services locally with Docker:**\n\n```bash\ndocker-compose up\n```\n\nThis will:\n- ✅ Automatically download AI model files during first build\n- ✅ Start Next.js app on localhost:3000\n- ✅ Start LiveKit voice agent\n\n☕ **First time?** The initial build takes 2-3 minutes to download AI models.\n\n5. **Access your local application:**\n\nOpen http://localhost:3000 in your browser and start a voice conversation!\n\n**Ready for production?** See [Deploy to Production (Render)](#-deploy-to-render) above.\n\n## 📦 Local Docker Commands\n\n**Start all services locally:**\n```bash\ndocker-compose up -d\n```\n\n**Stop all local services:**\n```bash\ndocker-compose down\n```\n\n**View local logs:**\n```bash\n# All services\ndocker-compose logs -f\n\n# Specific service\ndocker-compose logs -f app\ndocker-compose logs -f agent\n```\n\n**Rebuild after code changes:**\n```bash\ndocker-compose up -d --build\n```\n\n**Alternative: Run without Docker (local development):**\n```bash\n# Step 1: Install dependencies and download AI models\nnpm install\nnpm run agent:download\n\n# Step 2 (Terminal 1): Run the Next.js app\nnpm run dev\n\n# Step 3 (Terminal 2): Run the LiveKit agent\nnpm run agent:dev\n```\n\n## 🎨 Customization\n\n### Change the Voice\n\nEdit `agent/agent.ts`:\n\n```typescript\ntts: new TTS({\n  model: 'mistv2',\n  voice: 'lagoon', // Try: rainforest, lagoon, astra\n}),\n```\n\nAvailable voices: rainforest, lagoon, astra, and more. See [Rime TTS docs](https://docs.rime.ai/).\n\n\n### Modify Agent Personality\n\nUpdate the `instructions` in the `Assistant` class in `agent/agent.ts`:\n\n```typescript\ninstructions: `You are a friendly and helpful voice assistant...`\n```\n\n### Tech Stack Details\n\n**Frontend:**\n- **Next.js 16** - React framework\n- **LiveKit Components React** - Pre-built voice UI components\n- **Tailwind CSS** - Styling\n\n**Agent:**\n- **LiveKit Agents** - Voice agent framework\n- **Rime TTS** - Text-to-speech\n- **OpenAI GPT-5.2** (via LiveKit Inference) - Language model\n- **AssemblyAI** (via LiveKit Inference) - Speech-to-text\n- **Silero VAD** - Voice activity detection\n\n**Infrastructure:**\n- **Docker** - Containerization\n- **Render** - Cloud hosting\n- **LiveKit Cloud** - Real-time communication platform\n\n## 🔧 Environment Variables\n\nRequired environment variables (`.env`):\n\n```env\n# LiveKit Cloud (get with: lk cloud auth \u0026\u0026 lk app env -w)\nLIVEKIT_API_KEY=...\nLIVEKIT_API_SECRET=...\nLIVEKIT_URL=wss://...\n\n# API Keys\n# Required for TTS (Rime)\nRIME_API_KEY=...          # Get from https://rime.ai/\n\n# Optional: only if you switch from LiveKit Inference to provider plugins\n# OPENAI_API_KEY=...     # For OpenAI plugin (LLM)\n# ASSEMBLYAI_API_KEY=... # For AssemblyAI plugin (STT)\n```\n\n## 🐛 Troubleshooting\n\n**1. Agent won't start:**\n```bash\n# Ensure LiveKit and Rime keys are set (OpenAI/AssemblyAI optional when using LiveKit Inference)\ncat .env\n\n# Download model files\nnpm run agent:download\n\n# Check LiveKit Cloud authentication\nlk cloud auth\n```\n\n**2. No audio in browser:**\n- Ensure microphone permissions are granted\n- Check browser console for errors (F12)\n- Verify LiveKit Cloud connection in network tab\n- Try a different browser (Chrome recommended)\n\n**3. Local Docker build fails:**\n```bash\n# Ensure Docker is running\ndocker ps\n\n# Try rebuilding from scratch locally\ndocker-compose build --no-cache\n\n# Check local Docker logs\ndocker-compose logs agent\n```\n\n**4. Local Docker port conflicts:**\n```bash\n# Check what's using the port\nlsof -i :3000\n\n# Change port in docker-compose.yml if needed\n```\n\n**5. Agent connection errors:**\n- Verify LIVEKIT_URL is correct (should start with `wss://`)\n- Check LiveKit Cloud project is active: https://cloud.livekit.io/\n- Ensure API keys match the LiveKit project\n- Check agent logs: `docker-compose logs agent`\n\n**6. API key errors:**\n- Verify all API keys are valid and active\n- Check API key permissions and quotas\n- Ensure keys are properly set in `.env`\n- For Render deployment, verify environment variables are set in the Render dashboard\n\n**Getting more help:**\n1. **Local development**: Check logs with `docker-compose logs \u003cservice-name\u003e`\n2. **Production issues**: Check the Render dashboard for logs and metrics\n3. Verify all environment variables are set correctly (`.env` locally, Render dashboard for production)\n4. See detailed troubleshooting in `QUICK_START.md`\n5. Join the [LiveKit Discord](https://livekit.io/discord) community\n\n## 📚 Additional Documentation\n\n- `QUICK_START.md` - Comprehensive local development guide with Docker\n- `agent/AGENT_README.md` - Agent configuration and customization\n- [Render Documentation](https://render.com/docs) - Production deployment guides\n\n**External Resources:**\n- [LiveKit Documentation](https://docs.livekit.io/)\n- [LiveKit Agents Guide](https://docs.livekit.io/agents)\n- [Rime TTS Documentation](https://docs.rime.ai/)\n- [LiveKit Cloud Dashboard](https://cloud.livekit.io/)\n\n## 🤝 Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## 📄 License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frender-examples%2Fvoice-agent-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frender-examples%2Fvoice-agent-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frender-examples%2Fvoice-agent-template/lists"}