{"id":30697677,"url":"https://github.com/sameerqureshii/jarvis-ai-assistant","last_synced_at":"2026-02-11T20:07:03.833Z","repository":{"id":309571441,"uuid":"1036768939","full_name":"sameerqureshii/Jarvis-AI-Assistant","owner":"sameerqureshii","description":"A voice controlled AI assistant built with Python that combines speech recognition, text-to-speech, and Google's Gemini AI API to create a personalized virtual assistant experience.","archived":false,"fork":false,"pushed_at":"2025-08-12T15:54:46.000Z","size":16,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-12T17:18:35.066Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/sameerqureshii.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,"zenodo":null}},"created_at":"2025-08-12T14:55:33.000Z","updated_at":"2025-08-12T16:20:45.000Z","dependencies_parsed_at":"2025-08-16T04:45:44.183Z","dependency_job_id":null,"html_url":"https://github.com/sameerqureshii/Jarvis-AI-Assistant","commit_stats":null,"previous_names":["sameerqureshii/jarvis-ai-assistant"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/sameerqureshii/Jarvis-AI-Assistant","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameerqureshii%2FJarvis-AI-Assistant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameerqureshii%2FJarvis-AI-Assistant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameerqureshii%2FJarvis-AI-Assistant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameerqureshii%2FJarvis-AI-Assistant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sameerqureshii","download_url":"https://codeload.github.com/sameerqureshii/Jarvis-AI-Assistant/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameerqureshii%2FJarvis-AI-Assistant/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273264775,"owners_count":25074775,"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","status":"online","status_checked_at":"2025-09-02T02:00:09.530Z","response_time":77,"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":[],"created_at":"2025-09-02T09:38:08.020Z","updated_at":"2026-02-11T20:07:03.809Z","avatar_url":"https://github.com/sameerqureshii.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jarvis AI Assistant \nA voice controlled AI assistant built with Python that combines speech recognition, text-to-speech, and Google's Gemini AI to create a personalized virtual assistant experience.\n\n# ✨ Features:\n\n🎤 `Voice Recognition`: Wake word detection with \"Jarvis\"\u003cbr\u003e\n🗣️ `Text-to-Speech`: Natural voice responses using Google TTS\u003cbr\u003e\n🧠 `AI Integration`: Powered by Google Gemini for intelligent responses\u003cbr\u003e\n🌐 `Web Navigation`: Quick access to popular websites\u003cbr\u003e\n🎵 `Music Playback`: Voice controlled music from your library\u003cbr\u003e\n📰 `News Updates`: Fetch latest headlines from News API\u003cbr\u003e\n⚡ `Fast Commands`: Optimized hardcoded commands for common tasks\u003cbr\u003e\n\n# 🛠️ Installation:\n**Prerequisites:**\n\n  1. Python 3.7 or higher\u003cbr\u003e\n  2. Requires a microphone for voice input\u003cbr\u003e\n  3. API keys must be valid for features to work\u003cbr\u003e\n  4. Requires an internet connection for gTTS, NewsAPI, and Gemini AI\u003cbr\u003e\n\n# Required Dependencies:\n\npip install `speechrecognition`\u003cbr\u003e\npip install `pyttsx3`\u003cbr\u003e\npip install `requests`\u003cbr\u003e\npip install `google-generativeai`\u003cbr\u003e\npip install `gtts`\u003cbr\u003e\npip install `pygame`\u003cbr\u003e\npip install `pyaudio`\u003cbr\u003e\n\n# API Keys Setup:\n\n  • News API: Get your free API key from NewsAPI.\u003cbr\u003e\n  • Google Gemini API: Get your API key from Google AI Studio.\n\n# 📁 Project Structure:\n\njarvis-ai-assistant/\u003cbr\u003e\n├── main.py           # Main assistant code\u003cbr\u003e\n├── musicLibrary.py   # Predefined song names \u0026 YouTube links\u003cbr\u003e\n└── README.md         # Project documentation\n\n# ⚙️ Configuration:\n\nBefore running the assistant, update the API keys in `main.py`:\n\n  • NEWS_API_KEY = \"Your-API\"\u003cbr\u003e\n  • GEMINI_API_KEY = \"Your-API\"\n\n# 🚀 Usage:\n**Run the assistant:**\n\npython `main.py`\n\n  1. Wait for \"Initializing Jarvis...\" message\n  2. Say \"Jarvis\" to wake the assistant\n  3. Wait for \"Yes, Sameer\" response\n  4. Give your command within 6 seconds\n\n# 📋 Function Documentation:\n**Core Functions:**\n\n`speak(text)`\n\n**Purpose:** Converts text to speech using Google's TTS engine.\n\n**How it works:**\n\n  1. Creates a gTTS (Google Text-to-Speech) object\n  2. Saves audio to temporary MP3 file\n  3. Uses pygame to play the audio\n  4. Automatically cleans up temporary files\n  5. Falls back to error handling if TTS fails\n\n**Parameters:**\n\n  • `text` (string): Text to be spoken\n\n`speak_old(text)`\n\n**Purpose:** Alternative text-to-speech using offline pyttsx3 engine.\n\n**How it works:**\n\n  • Uses the local pyttsx3 engine for offline TTS\u003cbr\u003e\n  • More reliable but less natural sounding than Google TTS\n\n**Parameters:**\n\n  • `text` (string): Text to be spoken\n\n`aiProcess(command)`\n\n**Purpose:** Processes natural language commands using Google Gemini AI.\n\n**How it works:**\n\n  1. Sends user command to Gemini 1.5 Flash model\n  2. Uses system instruction to maintain Jarvis personality\n  3. Returns AI generated response text\n  4. Includes error handling for API failures\n\n**Parameters:**\n\n  1. `command` (string): User's voice command\n\n**Returns:** AI generated response text\n\n`processCommand(c)`\n\n**Purpose:** Main command processor that handles both hardcoded and AI commands.\n\n# How it works:\n\n**1. Website Navigation (Hardcoded for speed)**:\n\n  • \"open google\" → Opens Google\u003cbr\u003e\n  • \"open chatgpt\" → Opens ChatGPT\u003cbr\u003e\n  • \"open github\" → Opens developer's GitHub profile\u003cbr\u003e\n  • \"open linkedin\" → Opens developer's LinkedIn profile\n\n\n**4. Music Playback:**\n\n  • Command format: \"play [song_name]\"\u003cbr\u003e\n  • Searches musicLibrary.py for song links\u003cbr\u003e\n  • Opens YouTube links in default browser\u003cbr\u003e\n  • Provides feedback if song not found\n\n\n**3. News Updates:**\n\n  • Triggers on \"news\" keyword\u003cbr\u003e\n  • Fetches top US headlines from News API\u003cbr\u003e\n  • Reads first 3 headlines aloud\u003cbr\u003e\n  • Handles API errors gracefully\n\n\n**5. AI Fallback:**\n\n  • Any unrecognized command goes to Gemini AI\u003cbr\u003e\n  • Provides intelligent responses for general queries\u003cbr\u003e\n\n**Parameters:**\n\n  • `c` (string): Voice command from user\n\n# 🎵 Music Library:\n\nThe `musicLibrary.py` file contains a dictionary of song names mapped to YouTube URLs:\n\nmusic = {\u003cbr\u003e\n    \"stealth\": \"YouTube URL\",\u003cbr\u003e\n    \"march\": \"YouTube URL\",\u003cbr\u003e\n    \"skyfall\": \"YouTube URL\",\u003cbr\u003e\n    \"wolf\": \"YouTube URL\"\u003cbr\u003e\n}\n\n**Usage:** Say \"play [song_name]\" where song_name matches a key in the dictionary.\u003cbr\u003e\n**Adding Songs:** Add new entries to the music dictionary in the format `\"song_name\": \"youtube_url\"`\n\n# Modifying Voice Settings:\n\nAdjust recognition parameters in the main loop:\n\n  • `timeout`: Maximum wait time for voice input\u003cbr\u003e\n  • `phrase_time_limit`: Maximum length of spoken phrase\u003cbr\u003e\n  • `duration`: Ambient noise adjustment time\n\n# Changing AI Personality:\n\nModify the system instruction in the Gemini model configuration:\n\n`system_instruction=\"Your custom personality instructions here\"`\n\n# 📄 License:\n\nThis project is open source and available under the MIT License.\n\n# 🤝 Contributing:\n\nFeel free to fork this project and submit pull requests for improvements!\n\n# 👨‍💻 Developer:\n\n**Sameer Ahmed Qureshi**\n\n`Portfolio`: https://sameer-personall-portfolio.vercel.app \u003cbr\u003e\n`LinkedIn`: https://www.linkedin.com/in/sameer-ahmed-qureshi56\n\n\u003chr\u003e\n\nBuilt with using Python and Google AI\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsameerqureshii%2Fjarvis-ai-assistant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsameerqureshii%2Fjarvis-ai-assistant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsameerqureshii%2Fjarvis-ai-assistant/lists"}