{"id":26935050,"url":"https://github.com/chai-dev682/voice-medication-reminder-system","last_synced_at":"2025-04-02T11:17:10.335Z","repository":{"id":285611798,"uuid":"957881472","full_name":"chai-dev682/voice-medication-reminder-system","owner":"chai-dev682","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-01T17:32:58.000Z","size":33,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-01T18:41:50.447Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/chai-dev682.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":"2025-03-31T09:43:41.000Z","updated_at":"2025-04-01T17:33:02.000Z","dependencies_parsed_at":"2025-04-01T18:45:17.030Z","dependency_job_id":"14da63ba-9b54-4baf-9423-e8ededdd68e5","html_url":"https://github.com/chai-dev682/voice-medication-reminder-system","commit_stats":null,"previous_names":["chai-dev682/voice-medication-reminder-system"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chai-dev682%2Fvoice-medication-reminder-system","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chai-dev682%2Fvoice-medication-reminder-system/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chai-dev682%2Fvoice-medication-reminder-system/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chai-dev682%2Fvoice-medication-reminder-system/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chai-dev682","download_url":"https://codeload.github.com/chai-dev682/voice-medication-reminder-system/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246802620,"owners_count":20836373,"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":[],"created_at":"2025-04-02T11:16:59.230Z","updated_at":"2025-04-02T11:17:08.853Z","avatar_url":"https://github.com/chai-dev682.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Voice Medication Reminder System\n\nA voice-driven medication reminder system that uses Twilio to make calls to patients, remind them about their medications, and capture their responses using Speech-to-Text technology.\n\n## Features\n\n- Trigger voice calls to patients via a REST API\n- Text-to-Speech (TTS) for medication reminders using ElevenLabs\n- Real-time Speech-to-Text (STT) with Deepgram for interactive conversations\n- Intelligent response generation using OpenAI's GPT-4o\n- Voicemail and SMS fallback for unanswered calls\n- Call data logging to console\n- Robust error handling and edge case management\n- Comprehensive test suite\n\n## Prerequisites\n\n- Node.js (v18 or higher)\n- npm or yarn\n- Twilio account\n- Deepgram account (for STT)\n- ElevenLabs account (for TTS)\n- OpenAI account (for LLM)\n- ngrok (for local webhook testing)\n\n## Setup Instructions\n\n1. Clone the repository:\n   ```\n   git clone https://github.com/chai-dev682/voice-medication-reminder-system.git\n   cd voice-medication-reminder\n   ```\n\n2. Install dependencies:\n   ```\n   npm install\n   ```\n\n3. Create a `.env` file based on the `.env.example` template:\n   ```\n   cp .env.example .env\n   ```\n\n4. Fill in your API keys and configuration in the `.env` file.\n\n## Configuration\n\n### Environment Variables\n\nYour `.env` file should include the following variables:\n\n### Twilio Setup\n\n1. Sign up for a Twilio account at [twilio.com](https://www.twilio.com)\n2. Purchase a phone number with voice capabilities\n3. Get your Account SID and Auth Token from the Twilio dashboard\n4. Add these credentials to your `.env` file\n\n### STT Setup (Deepgram)\n\n1. Sign up for a Deepgram account at [deepgram.com](https://deepgram.com)\n2. Create an API key\n3. Add the API key to your `.env` file\n\n### TTS Setup (ElevenLabs)\n\n1. Sign up for an ElevenLabs account at [elevenlabs.io](https://elevenlabs.io)\n2. Create an API key\n3. Add the API key to your `.env` file\n\n### Local Development with ngrok\n\n1. Install ngrok: `npm install -g ngrok` or download from [ngrok.com](https://ngrok.com)\n2. Start your application: `npm run dev`\n3. In a separate terminal, start ngrok: `ngrok http 3000`\n4. Copy the ngrok URL (e.g., `https://abc123.ngrok.io`) and add it to your `.env` file as `WEBHOOK_BASE_URL`\n5. Configure your Twilio phone number's webhook to point to `{WEBHOOK_BASE_URL}/api/calls/incoming`\n\n## Usage\n\n### Starting the Server\n\n```\nnpm start\n```\n\nFor development with auto-reload:\n\n```\nnpm run dev\n```\n\n### API Endpoints\n\n#### Trigger a Call\n\n```\nPOST /api/calls/outgoing\nContent-Type: application/json\n\n{\n  \"phoneNumber\": \"+1234567890\"\n}\n```\n\n### Call Flow\n\n1. System initiates a call to the patient\n2. When answered, the system plays a medication reminder message\n3. The patient responds verbally\n4. Deepgram transcribes the response in real-time\n5. OpenAI processes the transcription and generates an appropriate reply\n6. ElevenLabs converts the reply to speech\n7. The system plays the response to the patient\n8. The conversation continues until the call ends\n\n## Testing\n\nRun the test suite:\n\n```\nnpm test\n```\n\nFor test coverage:\n\n```\nnpm run test:coverage\n```\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchai-dev682%2Fvoice-medication-reminder-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchai-dev682%2Fvoice-medication-reminder-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchai-dev682%2Fvoice-medication-reminder-system/lists"}