{"id":22052093,"url":"https://github.com/agentic-insights/voice-bot","last_synced_at":"2026-02-27T07:43:15.361Z","repository":{"id":251539169,"uuid":"828408358","full_name":"Agentic-Insights/voice-bot","owner":"Agentic-Insights","description":"AI Agent for Telephony voice bot - based on vocode, twilio, deepgram, and elevenlabs. Just add your own keys and prompt.","archived":false,"fork":false,"pushed_at":"2024-08-27T20:27:25.000Z","size":388,"stargazers_count":23,"open_issues_count":0,"forks_count":8,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-11T07:09:50.464Z","etag":null,"topics":["deepgram","docker","docker-compose","elevenlabs","helm","helm-charts","kubernetes","poetry-python","python","twilio","vocode"],"latest_commit_sha":null,"homepage":"https://agenticinsights.com/","language":"Python","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/Agentic-Insights.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}},"created_at":"2024-07-14T04:01:33.000Z","updated_at":"2025-04-30T05:27:26.000Z","dependencies_parsed_at":"2024-08-27T22:02:20.118Z","dependency_job_id":"7f0e3103-b830-49c7-ad1c-7d58185fa488","html_url":"https://github.com/Agentic-Insights/voice-bot","commit_stats":null,"previous_names":["agentic-insights/voice-bot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Agentic-Insights%2Fvoice-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Agentic-Insights%2Fvoice-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Agentic-Insights%2Fvoice-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Agentic-Insights%2Fvoice-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Agentic-Insights","download_url":"https://codeload.github.com/Agentic-Insights/voice-bot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253528970,"owners_count":21922636,"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":["deepgram","docker","docker-compose","elevenlabs","helm","helm-charts","kubernetes","poetry-python","python","twilio","vocode"],"created_at":"2024-11-30T15:13:06.364Z","updated_at":"2026-02-27T07:43:10.341Z","avatar_url":"https://github.com/Agentic-Insights.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🤖 Voice Bot\n\nVoice Bot Server is an opinionated version of Vocode Telephony Server with FastAPI - Deepgram, OpenAI, and ElevenLabs are used here to achieve a realistic sounding agent. This project enables you to build and deploy conversational AI agents that can handle inbound and outbound phone calls for various use cases such as information collection, appointment scheduling, sales, customer support, and more.\n\n## 🌟 Overview\n\nVoice Bot leverages the power of Vocode to support using AI agents with inbound and outbound phone calls. Users can create their own custom agents and integrate them seamlessly into their telephony systems.\n\n## 📋 Requirements\n\n- 🐳 [Docker](https://www.docker.com/) (required for running the project)\n\nAPI keys for:\n   - 🎙️ Deepgram (for speech transcription)\n   - 🧠 OpenAI (for the underlying agent)\n   - 🗣️ ElevenLabs (for speech synthesis)\n   - 📞 Twilio (for telephony)\n\nThe project uses the following components, which are automatically set up through Docker:\n\n- 🎬 [ffmpeg](https://ffmpeg.org/) (for audio processing)\n- 🗄️ [Redis](https://redis.io/) (for data storage and caching)\n- 📊 [Prometheus](https://prometheus.io/) (for metrics collection)\n\nThese dependencies are defined in the `docker-compose.yml` file and will be pulled in automatically when you run the project.\n\nFor local testing and development:\n\n- 🌐 [Ngrok](https://ngrok.com/) or [Cloudflare Tunnels](https://www.cloudflare.com/products/tunnel/) (optional, used to expose your local server to the internet for testing purposes)\n\nNote: Ngrok or Cloudflare Tunnels are not required for deployment but can be useful for local testing and development.\n\n## 📊 Metrics\n\nThe Voice Bot now includes Prometheus metrics for monitoring session activity:\n\n- `voicebot_session_count`: A counter that tracks the total number of sessions started.\n- `voicebot_active_sessions`: A gauge that shows the current number of active sessions.\n\nThese metrics are exposed on port 8000 and can be scraped by a Prometheus server.\n\n## 🛠️ Environment Setup\n\n1. Copy the `.env.template` file and fill in the values of your API keys:\n   ```\n   cp .env.template .env\n   ```\n\n2. Set up hosting so that Twilio can hit your server. An easy way to do this is ngrok or cloudflare:\n   ```\n   ngrok http 6000\n   ```\n   Copy the URI that is tunneling localhost:3000 to your `.env` without `https://`, e.g.:\n   ```\n   BASE_URI=asdf1234.ngrok.app\n   ```\n\n## 📞 Telephony Server\n\nThe TelephonyServer is responsible for receiving and making phone calls. The server is built using FastAPI and utilizes Twilio for telephony services.\n\n### 🚀 Running the Server\n\n1. Build and run the application using docker-compose:\n   ```\n   docker-compose up --build\n   ```\n\n## 📥 Setting up an Inbound Number\n\n1. Create a Twilio account\n2. In your Twilio dashboard, go to Phone Numbers -\u003e Manage -\u003e Buy a number to get a phone number\n3. Go to Phone Numbers -\u003e Manage -\u003e Active Numbers and select the number you want to set up\n4. Update the config to point the Webhook URL to `https://\u003cBASE_URI\u003e/inbound_call`\n5. Hit Save and call the number!\n\n## 📤 Executing Outbound Calls\n\n1. Ensure the server is running\n2. Install Poetry and dependencies:\n   ```\n   poetry \n3. Ensure .env has `TO_PHONE` set as the number you want to call and `FROM_PHONE` with your Twilio number.\n4. Run the script:\n   ```\n   poetry run python outbound_call.py\n   ```\n\n## ⚙️ Configuration\n\nBoth the `OutboundCall` (in `outbound_call.py`) and `InboundCallConfig` (in `inbound.py`) classes can accept a `TranscriberConfig`, `AgentConfig`, or `SynthesizerConfig`. \n\n### 🎙️ Transcriber\nThe default transcriber is Deepgram\n\n### 🗣️ Synthesizer\nThe default synthesizer is ElevenLabs\n\n## 🚀 Deployment with Helm and Kubernetes\n\n### Prerequisites\n\n- Kubernetes cluster (e.g., Minikube, EKS, GKE, AKS)\n- Helm 3.0+\n- kubectl configured to communicate with your cluster\n\n### Deployment Steps\n\n1. Clone the repository and navigate to the project directory:\n   ```\n   git clone https://github.com/Agentic-Insights/voice-bot\n   cd voice-bot\n   ```\n\n2. Create a `my-values.yaml` file in the project root with your specific configuration:\n   ```yaml\n   env:\n     BASE_URI: \"application-base-uri\"\n     DEEPGRAM_API_KEY: \"your-deepgram-key\"\n     OPENAI_API_KEY: \"your-openai-key\"\n     OPENAI_BASE_URL: \"your-openai-based-base-url\"\n     ELEVEN_LABS_API_KEY: \"your-eleven-labs-key\"\n     ELEVEN_LABS_VOICE_ID: \"your-eleven-labs-voice-id\"\n     TWILIO_ACCOUNT_SID: \"your-twilio-sid\"\n     TWILIO_AUTH_TOKEN: \"your-twilio-token\"\n     FROM_PHONE: \"your-from-phone\"\n     TO_PHONE: \"your-to-phone\"\n   ```\n\n3. Install the Helm chart:\n   ```\n   helm install voice-bot ./kubernetes/voice-bot-helm/voice-bot -f my-values.yaml\n   ```\n\n4. Check the status of your deployment:\n   ```\n   kubectl get pods\n   kubectl get services\n   ```\n\n5. To access your application, set up port-forwarding:\n   ```\n   k8s-port-forward.bat\n   (TODO does not work) kubectl port-forward service/voice-bot 6000:3000 (/TODO)\n   ```\n   Your application should now be accessible at `http://localhost:6000`.\n\n### Updating the Deployment\n\nTo update your deployment after making changes:\n\n```\nhelm upgrade voice-bot ./kubernetes/voice-bot-helm/voice-bot -f my-values.yaml\n```\n\n### Uninstalling the Deployment\n\nTo remove the Voice Bot Server from your cluster:\n\n```\nhelm uninstall voice-bot\n```\n\n### Troubleshooting\n\n- If you encounter issues, check the logs of your pods:\n  ```\n  kubectl logs deployment/voice-bot\n  ```\n\n- For more detailed information about your deployment:\n  ```\n  kubectl describe deployment voice-bot\n  kubectl describe service voice-bot\n  ```\n\nRemember to update your Twilio webhook URL to point to your new Kubernetes-hosted Voice Bot Server.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagentic-insights%2Fvoice-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagentic-insights%2Fvoice-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagentic-insights%2Fvoice-bot/lists"}