{"id":24798813,"url":"https://github.com/403errors/ai_voice_chatbot","last_synced_at":"2025-03-24T22:41:53.641Z","repository":{"id":253863284,"uuid":"844759441","full_name":"403errors/AI_Voice_Chatbot","owner":"403errors","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-22T13:39:59.000Z","size":13,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-30T02:15:16.623Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/403errors.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-08-19T23:10:19.000Z","updated_at":"2024-08-22T13:40:03.000Z","dependencies_parsed_at":"2024-08-22T15:17:04.534Z","dependency_job_id":null,"html_url":"https://github.com/403errors/AI_Voice_Chatbot","commit_stats":null,"previous_names":["403errors/ai_voice_chatbot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/403errors%2FAI_Voice_Chatbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/403errors%2FAI_Voice_Chatbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/403errors%2FAI_Voice_Chatbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/403errors%2FAI_Voice_Chatbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/403errors","download_url":"https://codeload.github.com/403errors/AI_Voice_Chatbot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245366199,"owners_count":20603438,"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-01-30T02:15:19.384Z","updated_at":"2025-03-24T22:41:53.487Z","avatar_url":"https://github.com/403errors.png","language":"Python","readme":"# Conversational AI Chatbot with Speech Recognition\n\nFor more detailed instructions on how to build the chatbot, check out my article on [Medium](https://medium.com/@brianhulela/create-a-python-ai-voice-chatbot-with-speechrecognition-langchain-and-openai-gpt-3-5-turbo-c60f92f4a47c)\n\nThis project implements a conversational AI chatbot that uses the [Whisper](https://platform.openai.com/docs/guides/speech-to-text) model to transcribe user speech to text. It utilizes the OpenAI GPT-3.5-turbo/GPT-4 LLM for generating human-like responses. It then synthesizes the output into human-like audio speech output using [Text-to-speech](https://platform.openai.com/docs/guides/text-to-speech).\n\n## Features\n\n- Speech recognition: The chatbot listens to user speech input and converts it into text.\n- Interactive responses: The chatbot uses the [Langchain](https://www.langchain.com/), GPT-3.5-turbo/GPT-4 model to generate context-aware and engaging responses.\n- Voice output: The chatbot's responses are synthesized into speech using OpenAI [Text-to-speech](https://platform.openai.com/docs/guides/text-to-speech)\n- Interactive conversation: The chatbot maintains a memory of past conversations to create a context-rich interaction.\n\n## Usage\n\n1. **Clone the repository to your local machine:**\n\n    ```bash\n    git clone https://github.com/Brianhulela/AI-Voice-Chatbot\n    ```\n\n2. **Navigate to the project directory:**\n\n    ```bash\n    cd AI-Voice-Chatbot\n    ```\n\n3. **Install project dependencies:**\n\n    ```bash\n    pip install -r requirements.txt\n    ```\n\n4. **Set up your OpenAI API key:**\n\n    In the project directory, create a `.env` file and add the following line:\n    \n    ```\n    YOUR_OPENAI_API_KEY='your-openai-api-key'\n    ```\n    \n    Replace `'your-openai-api-key'` with your actual OpenAI API key in the `.env` file.\n\n5. **Run the chatbot:**\n\n    ```bash\n    python ai_friend.py\n    ```\n\n    The chatbot will initiate a conversation by greeting you in a friendly manner. You can respond to the chatbot's prompts using your voice. To exit the conversation, say \"bye\".\n\n## Notes\n\n- Make sure you have an active internet connection to use the OpenAI API.\n- You might need to adjust the microphone source in the `listen()` function if you have multiple audio devices.\n\n## Acknowledgments\n\n- This project uses the OpenAI GPT-3.5-turbo/GPT-4 model for generating responses.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F403errors%2Fai_voice_chatbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F403errors%2Fai_voice_chatbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F403errors%2Fai_voice_chatbot/lists"}