{"id":51385024,"url":"https://github.com/drwale-dev-labs/ai-auto-assistant","last_synced_at":"2026-07-03T19:39:19.701Z","repository":{"id":256790594,"uuid":"856369760","full_name":"drwale-dev-labs/ai-auto-assistant","owner":"drwale-dev-labs","description":"A voice-based AI agent designed for a car dealership. This agent can interact with users via voice commands, respond using natural language, \u0026 provide continuous speech-to-speech conversations. The system uses Google Cloud's Speech-to-Text \u0026 Text-to-Speech services, OpenAI's GPT-3.5-turbo for generating responses, \u0026 Streamlit for the user interface","archived":false,"fork":false,"pushed_at":"2024-09-12T16:16:56.000Z","size":1474,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-07-03T19:39:18.657Z","etag":null,"topics":["google-api","google-cloud","google-cloud-platform","openai","openai-api","speech-synthesis","speech-to-text","streamlit","text-to-speech"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/drwale-dev-labs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-09-12T13:18:42.000Z","updated_at":"2025-03-04T17:17:46.000Z","dependencies_parsed_at":"2024-09-13T04:01:19.658Z","dependency_job_id":"f225486c-91c5-40a6-9b20-fce95b5e3224","html_url":"https://github.com/drwale-dev-labs/ai-auto-assistant","commit_stats":null,"previous_names":["presizhai/ai-auto-assistant","drwale-dev-labs/ai-auto-assistant"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/drwale-dev-labs/ai-auto-assistant","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drwale-dev-labs%2Fai-auto-assistant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drwale-dev-labs%2Fai-auto-assistant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drwale-dev-labs%2Fai-auto-assistant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drwale-dev-labs%2Fai-auto-assistant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drwale-dev-labs","download_url":"https://codeload.github.com/drwale-dev-labs/ai-auto-assistant/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drwale-dev-labs%2Fai-auto-assistant/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35099548,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-03T02:00:05.635Z","response_time":110,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["google-api","google-cloud","google-cloud-platform","openai","openai-api","speech-synthesis","speech-to-text","streamlit","text-to-speech"],"created_at":"2026-07-03T19:39:19.092Z","updated_at":"2026-07-03T19:39:19.697Z","avatar_url":"https://github.com/drwale-dev-labs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AI Auto Assistant\n\nThis project is a voice-based AI agent designed for a car dealership. The AI agent can interact with users via voice commands, respond using natural language, and provide continuous speech-to-speech conversations. The system uses Google Cloud's Speech-to-Text and Text-to-Speech services, OpenAI's GPT-3.5-turbo for generating responses, and Streamlit for the user interface.\n\n![AI Voice Assistant for Car Dealership](images/ai_assistant.webp)\n\n## Table of Contents\n* **Features**\n* **Prerequisites**\n* **Installation**\n* **Configuration**\n* **Usage**\n* **Project Structure**\n* **Modules Description**\n* **License**\n\n## Features\n* Continuous voice-based interaction without requiring manual intervention between responses.\n* Uses Google Cloud for speech recognition and text-to-speech synthesis.\n* Incorporates OpenAI's GPT-3.5-turbo to generate natural language responses.\n* Implements a turn-taking model using sentiment analysis to decide when the AI should respond.\n* Provides a visual indicator while the AI is responding.\n\n## Prerequisites\n* Python 3.8 or later\n* Google Cloud account with Speech-to-Text and Text-to-Speech APIs enabled\n* OpenAI API key\n* FFmpeg installed and accessible from the command line\n\n## Installation\n\n1. Clone the Repository\n```bash\n       git clone https://github.com/presiZHai/ai-auto-assistant.git\n\n       cd ai-auto-assistant\n```\n2. Create and Activate a Virtual Environment\n\n```bash\n        conda create --name voice-auto-assistant python=3.10 -y\n\n        conda activate voice-auto-assistant\n```\n3. Install Required Packages\n\n```bash\n        pip install -r requirements.txt\n```\n\n## Configuration\n\n1. Set Up Environment Variables\n\nCreate a .env file in the project root directory with the following content:\n```bash\n        OPENAI_API_KEY=your_openai_api_key\n\n        GOOGLE_APPLICATION_CREDENTIALS_PATH=path_to_your_google_service_account_json\n```\n\n2. Obtain API Keys\n\n* Google Cloud: Create a service account, enable Speech-to-Text and Text-to-Speech APIs, and download the service account key file in JSON format. Set the path to this file in the .env file as GOOGLE_APPLICATION_CREDENTIALS_PATH.\n* OpenAI: Sign up at OpenAI and get your API key. Set it as OPENAI_API_KEY in the .env file.\n\n## Usage\n\n1. Run the Application\n\n```bash\n        streamlit run main_app.py\n```\n\n2. Start or Stop the Conversation\n\n* Click the \"Start/Stop Conversation\" button to begin or end the voice interaction.\n\n![AI Voice Assistant Example](images/voice-agent.png)\n\n\n\n## Project Structure\n\n* main_app.py: The main Streamlit application that handles the user interface and orchestrates the interaction loop.\n* stt_module.py: Speech-to-Text module that transcribes user input using Google Cloud's Speech-to-Text API.\n* tts_module.py: Text-to-Speech module that converts AI responses to audio using Google Cloud's Text-to-Speech API.\n* llm_module.py: Language model module that generates responses using OpenAI's GPT-3.5-turbo.\n* turn_taking_model.py: Turn-taking module that decides if the AI should respond based on sentiment analysis.\n* requirements.txt: List of Python dependencies required for the project.\n* .env: Environment file to store sensitive API keys.\n\n## Modules Description\n\n1. stt_module.py\nHandles audio transcription using Google Cloud's Speech-to-Text API. This module includes:\n* convert_audio: Converts input audio files to the required format (16kHz, mono, WAV).\n* transcribe: Transcribes the audio content into text.\n\n2. tts_module.py\nGenerates spoken responses from text using Google Cloud's Text-to-Speech API. This module includes:\n* synthesize_speech: Takes input text and returns the audio content in MP3 format.\n\n3. llm_module.py\nUses OpenAI's GPT-3.5-turbo to generate conversational responses. This module includes:\n* generate_response: Generates a response based on the user's input prompt.\n\n4. turn_taking_model.py\nImplements a turn-taking model using a sentiment analysis pipeline to decide if the AI should respond. This module includes:\n* should_respond: Determines if the AI should respond based on silence duration and sentiment score.\n\n5. main_app.py\nThe main application script that:\n* Initializes the modules.\n* Records audio from the user.\n* Transcribes the audio, generates a response, and synthesizes speech.\n* Manages the conversation flow and displays the conversation history.\n\n## License\n\nThis project is licensed under the MIT License. See the LICENSE file for more information.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrwale-dev-labs%2Fai-auto-assistant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrwale-dev-labs%2Fai-auto-assistant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrwale-dev-labs%2Fai-auto-assistant/lists"}