Skip to content

hassanwaheedali/Agentis-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Agentis - Voice-Controlled AI Assistant

A Python-based voice-activated AI assistant that listens to voice commands and responds with intelligent answers, web browsing, music playback, and more.

📁 Project Files

  • main.py - Main voice assistant application
  • music_libary.py - Music library with song links

🎯 Features

  • Voice Commands: Understands and processes natural voice commands
  • AI Responses: Powered by Google Gemini 2.5 Flash for intelligent conversations
  • Text-to-Speech: Responds using Google Text-to-Speech (gTTS)
  • Web Browsing: Can open websites and search on Google
  • Music Playback: Play songs from your music library
  • News Headlines: Fetch and read the latest news
  • Time & Date: Tell current time and date
  • Music Library: Pre-loaded with curated songs

🛠️ Technology Stack

  • Speech Recognition: Google Speech Recognition API
  • Text-to-Speech: Google Text-to-Speech (gTTS)
  • AI Engine: Google Gemini 2.5 Flash API
  • Audio Processing: pygame
  • Web Browser Control: webbrowser module
  • HTTP Requests: requests library

📋 Requirements

speech_recognition
google-generativeai
gtts
pygame
requests

🚀 Getting Started

Installation

  1. Install dependencies:

    pip install speech_recognition google-generativeai gtts pygame requests
  2. Ensure your microphone is connected and configured

Running Agentis

python main.py

🎤 Voice Commands

General Commands

  • "What is your name?" - Responds with "I am Agentis, your personal assistant"
  • "Stop" / "Exit" / "Quit" - Deactivates the assistant

Time & Date

  • "What time is it?" - Returns current time
  • "What's the date?" - Returns current date

Web Browsing

  • "Open Google" - Opens Google search
  • "Open YouTube" - Opens YouTube
  • "Open Brave" - Opens Brave browser
  • "Open [website]" - Opens any website (e.g., "Open GitHub")
  • "Search for [query]" - Searches Google for your query

Music

  • "Play [song name]" - Plays a song from the library
    • Available songs: stealth, march, skyfall, wolf

News

  • "News" - Reads the latest top news headlines

General Chat

  • Any other voice input is sent to Gemini AI for an intelligent response

🎵 Music Library

Current songs in the library:

To add more songs, edit the music_libary.py file and add entries to the music dictionary.

⚠️ Important Notes

  • API keys are currently hardcoded in the source. Move them to environment variables for production use
  • Requires a working microphone and internet connection
  • Google News API key is included but should be replaced with your own

📝 File Descriptions

main.py

Main application with:

  • speak(text) - Converts text to speech and plays it
  • ai_response(prompt) - Generates AI responses using Gemini
  • processcommand(voice) - Processes and executes voice commands
  • Main loop for listening and responding

music_libary.py

Dictionary of songs with YouTube links for music playback

🔧 Customization

You can customize:

  • Add more songs to the music library in music_libary.py
  • Modify AI prompts in the ai_response() function
  • Add new commands in the processcommand() function
  • Change greeting messages and responses

📄 License

This project is provided for educational and personal use.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages