{"id":29082473,"url":"https://github.com/garbii1/voice-assistant-chatapp","last_synced_at":"2026-04-08T18:05:36.868Z","repository":{"id":298590420,"uuid":"1000408455","full_name":"Garbii1/voice-assistant-chatapp","owner":"Garbii1","description":"🤖 An intelligent voice assistant powered by OpenAI GPT and IBM Watson Speech. Built with Python, Flask, and Docker. 🎤","archived":false,"fork":false,"pushed_at":"2025-06-20T14:11:00.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-27T20:42:43.479Z","etag":null,"topics":["ai-powered","api","chatbot","docker","flask","full-stack","gpt","gpt-3-5-turbo","html-css-javascript","ibm-watson","openai","openai-api","python","speech-to-text","text-to-speech","voice-assistant"],"latest_commit_sha":null,"homepage":"","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/Garbii1.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,"zenodo":null}},"created_at":"2025-06-11T18:26:37.000Z","updated_at":"2025-06-20T14:11:03.000Z","dependencies_parsed_at":"2025-06-11T22:40:47.567Z","dependency_job_id":"e37edd65-3649-4380-9e78-067dc3d71a01","html_url":"https://github.com/Garbii1/voice-assistant-chatapp","commit_stats":null,"previous_names":["garbii1/voice-assistant-chatap"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Garbii1/voice-assistant-chatapp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Garbii1%2Fvoice-assistant-chatapp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Garbii1%2Fvoice-assistant-chatapp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Garbii1%2Fvoice-assistant-chatapp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Garbii1%2Fvoice-assistant-chatapp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Garbii1","download_url":"https://codeload.github.com/Garbii1/voice-assistant-chatapp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Garbii1%2Fvoice-assistant-chatapp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31567269,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["ai-powered","api","chatbot","docker","flask","full-stack","gpt","gpt-3-5-turbo","html-css-javascript","ibm-watson","openai","openai-api","python","speech-to-text","text-to-speech","voice-assistant"],"created_at":"2025-06-27T20:36:09.131Z","updated_at":"2026-04-08T18:05:36.839Z","avatar_url":"https://github.com/Garbii1.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Voice Assistant with OpenAI GPT-3 \u0026 IBM Watson\n\n## Conversational AI web app: Speak, listen, and chat with GPT-3, powered by IBM Watson Speech Services\n\n[Features](#-features) • [Tech Stack](#-tech-stack) • [How It Works](#-how-it-works) • [Screenshots](#-screenshots) • [Prerequisites](#-prerequisites) • [Getting Started](#-getting-started) • [Learning Objectives](#-learning-objectives) • [Acknowledgements](#-acknowledgements)\n\n---\n\n## 🎯 Objectives\n\n- Integrate OpenAI GPT-3 with a web application\n- Use IBM Watson APIs for speech recognition and synthesis\n- Build a full-stack app with Flask and modern frontend tools\n- Containerize and deploy with Docker\n\n---\n\n## ✨ Features\n\n- 🎤 **Voice Interaction:** Speak to the assistant and hear its responses.\n- 🧠 **Intelligent Responses:** Powered by OpenAI's `gpt-3.5-turbo` model for natural and coherent conversations.\n- 🗣️ **High-Quality Speech Services:** Utilizes IBM Watson for fast and accurate Speech-to-Text and Text-to-Speech conversion.\n- 🌐 **Responsive Web Interface:** Clean, modern UI with HTML, CSS, and JavaScript.\n- 🎨 **Light \u0026 Dark Modes:** User-friendly theme switching for comfort.\n- 📦 **Containerized:** Includes a `Dockerfile` for easy setup and deployment.\n- 🐍 **Python Backend:** Built on the lightweight Flask web framework.\n\n---\n\n## 🛠️ Tech Stack\n\n- **Backend:** Python, Flask\n- **Frontend:** HTML, CSS, JavaScript, JQuery, Bootstrap, Font Awesome\n- **AI Services:**\n  - OpenAI API (`gpt-3.5-turbo`)\n  - IBM Watson Speech to Text\n  - IBM Watson Text to Speech\n- **Containerization:** Docker\n\n---\n\n## 🧩 How It Works\n\n1. **Frontend (JavaScript):** Captures microphone audio when the user clicks the record button.\n2. **Speech-to-Text:** Audio is sent to Flask backend's `/speech-to-text` endpoint, which uses IBM Watson Speech-to-Text API.\n3. **User Prompt:** Transcribed text is returned and displayed as the user's message.\n4. **Process Prompt:** Frontend sends the text to backend's `/process-message` endpoint.\n5. **OpenAI GPT-3:** Backend sends the prompt to OpenAI API for a response.\n6. **Text-to-Speech:** OpenAI's response is sent to IBM Watson Text-to-Speech API for audio synthesis.\n7. **Final Response:** Backend returns the text and audio (base64) to the frontend.\n8. **Playback:** Frontend displays the assistant's response and plays the audio.\n\n---\n\n## 🚀 Prerequisites\n\n- **Docker:** Ensure Docker is installed.\n- **Git:** To clone the repository.\n- **API Keys:**\n  - **OpenAI:** Create an account and get an API key.\n  - **IBM Cloud:** Provision Speech to Text and Text to Speech services, get their URLs and API keys.\n\n---\n\n## 🏁 Getting Started\n\n### 1. Clone the Repository\n\n```bash\ngit clone https://github.com/ibm-developer-skills-network/bkrva-chatapp-with-voice-and-openai-outline.git\nmv bkrva-chatapp-with-voice-and-openai-outline chatapp-with-voice-and-openai-outline\ncd chatapp-with-voice-and-openai-outline\n```\n\n### 2. Configure the Services\n\nEdit `worker.py` to add your API keys and service URLs:\n\n- **IBM Watson Speech-to-Text:** In `speech_to_text`, update `base_url` with your service URL.\n- **IBM Watson Text-to-Speech:** In `text_to_speech`, update `base_url` with your service URL.\n- **OpenAI:** Ensure your API key is set (typically via environment variable).\n\nExample:\n\n```python\n# worker.py\n\ndef speech_to_text(audio_binary):\n    base_url = 'https://YOUR-WATSON-STT-URL'  # \u003c-- REPLACE WITH YOUR URL\n    api_url = base_url + '/speech-to-text/api/v1/recognize'\n    # ...\n\ndef text_to_speech(text, voice=\"\"):\n    base_url = 'https://YOUR-WATSON-TTS-URL'  # \u003c-- REPLACE WITH YOUR URL\n    api_url = base_url + '/text-to-speech/api/v1/synthesize?output=output_text.wav'\n    # ...\n```\n\n### 3. Build and Run with Docker\n\n```bash\n# Build the Docker image\ndocker build . -t voice-chatapp-powered-by-openai\n\n# Run the container, mapping port 8000\ndocker run -p 8000:8000 voice-chatapp-powered-by-openai\n```\n\n\u003e **Tip:** If you make code changes, stop the container (Ctrl+C), rebuild, and rerun.\n\n### 4. Test Your Assistant\n\nOpen your browser and go to [http://localhost:8000](http://localhost:8000) to interact with your voice assistant!\n\n---","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarbii1%2Fvoice-assistant-chatapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgarbii1%2Fvoice-assistant-chatapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarbii1%2Fvoice-assistant-chatapp/lists"}