Skip to content

πŸ€– N.Y.R.A (Nimble Yet Reliable Assistant) is a voice-activated Python AI assistant designed to handle everyday tasks like playing music, fetching news, opening websites, and responding with AI-generated replies using Google's Gemini Pro.

License

Notifications You must be signed in to change notification settings

XaXtric7/N.Y.R.A

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– N.Y.R.A - Nimble Yet Reliable Assistant

N.Y.R.A (Nimble Yet Reliable Assistant) is a voice-activated Python AI assistant designed to handle everyday tasks like playing music, fetching news, opening websites, and responding with AI-generated replies using Google's Gemini Pro.


πŸš€ Features

  • πŸŽ™οΈ Voice Command Recognition
    Say "Nyra" to activate the assistant and issue voice commands.

  • 🌐 Open Websites
    Commands like β€œopen Google”, β€œopen YouTube”, etc.

  • 🎡 Play Music
    Ask N.Y.R.A to play a song from your predefined library.

  • πŸ—žοΈ Fetch Latest News
    Get the latest headlines using NewsAPI.

  • 🧠 AI-Powered Conversations
    Chat with N.Y.R.A using Google's Gemini Pro.

  • πŸ”Š Text-to-Speech
    Replies are spoken using Google's gTTS and played with Pygame.


🧠 Technologies Used

  • speech_recognition – For speech-to-text from your microphone
  • google-generativeai – For AI-generated text replies (Gemini Pro)
  • gtts – Converts text to speech
  • pygame – Plays the MP3 speech output
  • requests – For fetching news from NewsAPI
  • dotenv – For secure API key management
  • webbrowser – Opens web URLs in the default browser

πŸ“ Project Structure

AI_ASSIS/
β”œβ”€β”€ .env.example            # Sample environment config
β”œβ”€β”€ hello.mp3               # Sample MP3 file (optional)
β”œβ”€β”€ main.py                 # Main assistant logic
β”œβ”€β”€ musicLibrary.py         # Dictionary of songs mapped to YouTube links
β”œβ”€β”€ requirements.txt        # List of dependencies
└── README.md               # This file

πŸ” Setup and Usage

1. Clone the Repository

git clone https://github.com/yourusername/nyra-assistant.git
cd nyra-assistant

2. Create a Virtual Environment

python -m venv .venv
# Activate it:
# On Windows:
.venv\Scripts\activate
# On macOS/Linux:
source .venv/bin/activate

3. Install Dependencies

pip install -r requirements.txt

4. Set Up Your .env File

Create a .env file with your API keys:

NEWS_API_KEY=your_newsapi_key
GEMINI_API_KEY=your_gemini_api_key

Or copy from example:

cp .env.example .env

5. Run the Assistant

python main.py

Speak "Nyra" to activate voice recognition.


πŸ“ Sample Commands

  • "Nyra" β†’ Wake word
  • "Open Google"
  • "Play [song name]"
  • "Give me the news"
  • "What's the capital of France?"

πŸ“Œ Notes

  • You can customize the music list in musicLibrary.py.
  • Avoid committing your .env file β€” keep your API keys safe!
  • Internet connection is required for news, AI, and TTS features.

πŸ“œ License

This project is open-source and available under the MIT License.


✨ Credits

Developed with ❀️ by Sarthak Dharmik

About

πŸ€– N.Y.R.A (Nimble Yet Reliable Assistant) is a voice-activated Python AI assistant designed to handle everyday tasks like playing music, fetching news, opening websites, and responding with AI-generated replies using Google's Gemini Pro.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages