{"id":13790973,"url":"https://github.com/shamspias/whatsapp-voice-gpt","last_synced_at":"2025-04-12T07:41:45.874Z","repository":{"id":153499133,"uuid":"627351265","full_name":"shamspias/whatsapp-voice-gpt","owner":"shamspias","description":"SonicAI is a WhatsApp Chatbot designed to provide users with a convenient and engaging way to interact with an AI assistant. Powered by OpenAI's GPT-3.5-turbo, SonicAI offers a responsive and dynamic chat experience that can help users with a variety of tasks and inquiries.","archived":false,"fork":false,"pushed_at":"2023-04-19T18:28:07.000Z","size":53,"stargazers_count":28,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-26T02:51:12.247Z","etag":null,"topics":["celery","chatbot","chatgpt-whatsapp-bot","flask","gpt-3","gpt-3-5-turbo","gpt-35-turbo","gpt-4","llm","openai","openai-api","python","python3","task-scheduler","voice-chat","voice-chat-bot","voice-recognition","whatsapp","whatsapp-bot","whatsapp-chat"],"latest_commit_sha":null,"homepage":"","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/shamspias.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":"2023-04-13T09:34:29.000Z","updated_at":"2025-01-28T11:13:34.000Z","dependencies_parsed_at":"2023-05-27T19:45:16.478Z","dependency_job_id":null,"html_url":"https://github.com/shamspias/whatsapp-voice-gpt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shamspias%2Fwhatsapp-voice-gpt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shamspias%2Fwhatsapp-voice-gpt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shamspias%2Fwhatsapp-voice-gpt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shamspias%2Fwhatsapp-voice-gpt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shamspias","download_url":"https://codeload.github.com/shamspias/whatsapp-voice-gpt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248536981,"owners_count":21120683,"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":["celery","chatbot","chatgpt-whatsapp-bot","flask","gpt-3","gpt-3-5-turbo","gpt-35-turbo","gpt-4","llm","openai","openai-api","python","python3","task-scheduler","voice-chat","voice-chat-bot","voice-recognition","whatsapp","whatsapp-bot","whatsapp-chat"],"created_at":"2024-08-03T22:00:53.733Z","updated_at":"2025-04-12T07:41:45.852Z","avatar_url":"https://github.com/shamspias.png","language":"Python","funding_links":[],"categories":["Chat UIs"],"sub_categories":[],"readme":"# WhatsApp Voice GPT Chatbot: SonicAI\n\n## Overview\nSonicAI is built using Python, Flask, Twilio API, and OpenAI API. The chatbot utilizes asynchronous tasks with Celery to handle user requests and communicate with the OpenAI API efficiently. It supports both text and voice messages, allowing users to interact with the chatbot in their preferred format. The project is designed to be easily deployable and scalable, offering a seamless integration with WhatsApp.\n\n## Features\n- Engaging text-based conversations with GPT-3.5-turbo-powered AI\n- Voice message recognition and processing\n- Dynamic conversation tracking and history\n- Supports commands to clear conversation history\n- Utilizes asynchronous tasks with Celery for efficient request handling\n- Built with Flask, Twilio API, and OpenAI API\n\n## Installation\nTo set up SonicAI, follow the steps below:\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/shamspias/whatsapp-voice-gpt.git \n```\n2. Change into the project directory:\n```bash\ncd whatsapp-voice-gpt\n```\n3. Create a virtual environment:\n```bash\npython3 -m venv venv\n```\n4. Activate the virtual environment:\n```bash\nsource venv/bin/activate\n```\n5. Install the dependencies and install redis-server:\n```bash\npip install -r requirements.txt\n```\n6. Create a Twilio account and get your account SID and auth token. You can find the instructions [here](https://www.twilio.com/docs/usage/tutorials/how-to-use-your-free-trial-account).\n7. Create an OpenAI account and get your API key. You can find the instructions [here](https://beta.openai.com/docs/developer-quickstart/1-creating-an-api-key).\n8. Create a `.env` file in the project directory and add the following environment variables or copy the contents of `.env.example` into the `.env` file:\n```bash\nTWILIO_ACCOUNT_SID=your_twilio_account_sid\nTWILIO_AUTH_TOKEN=your_twilio_auth_token\nTWILIO_PHONE_NUMBER=your_twilio_phone_number\nOPEN_AI_KEY=your_openai_api_key\nCELERY_BROKER_URL=your_celery_broker_url\nCELERY_RESULT_BACKEND=your_celery_result_backend\nSYSTEM_PROMPT=your_system_prompt\n```\n9. Run the celery worker:\n```bash\ncelery -A app.celery worker --loglevel=info\n```\n10. Run the flask server:\n```bash\npython app.py\n```\n11. Expose the flask server to the internet using a tunneling service like [ngrok](https://ngrok.com/). You can find the instructions [here](https://www.twilio.com/docs/usage/tutorials/how-to-set-up-your-python-and-flask-development-environment#expose-your-application-to-the-internet).\n12. Add the ngrok URL to your Twilio phone number's messaging webhook. You can find the instructions [here](https://www.twilio.com/docs/usage/tutorials/how-to-use-your-free-trial-account#configure-your-twilio-phone-number).\n13. Add the ngrok URL to your Twilio phone number's voice webhook. You can find the instructions [here](https://www.twilio.com/docs/voice/tutorials/how-to-receive-and-reply-inbound-phone-calls-python#configure-your-twilio-phone-number).\n14. Send a WhatsApp message to your Twilio phone number to start a conversation with the chatbot.\n15. Send a WhatsApp voice message to your Twilio phone number to start a voice conversation with the chatbot.\n16. Send a WhatsApp message to your Twilio phone number with the command `/clear` to clear the conversation history.\n17. Send a WhatsApp message to your Twilio phone number with the command `/help` to view the list of available commands.\n\n## Contributing\nContributions are welcome! If you'd like to contribute, please submit a pull request or open an issue with your proposed changes or bug reports.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshamspias%2Fwhatsapp-voice-gpt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshamspias%2Fwhatsapp-voice-gpt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshamspias%2Fwhatsapp-voice-gpt/lists"}