A voice-activated AI assistant inspired by Iron Man's F.R.I.D.A.Y. — wake it with your voice, give it commands, and it responds intelligently using Google's Gemini AI.
Features · Setup · Usage · Commands · Project Structure
- 🎤 Wake word activation — just say "Friday" to activate
- 🧠 AI-powered responses — powered by Google Gemini 2.5 Flash Lite
- 🌐 Open websites — launch Google, YouTube, GitHub, Codeforces by voice
- 🎵 Play music — say "play [song name]" to open songs from your library
- 📰 Read the news — fetches and reads top headlines aloud
- 🔊 Text-to-speech — speaks every response using
pyttsx3 - 😴 Deactivate by voice — say "deactivate" to shut Friday down
| Package | Purpose |
|---|---|
speech_recognition |
Converts your voice to text |
pyttsx3 |
Text-to-speech (offline) |
google-genai |
Gemini AI for smart responses |
requests |
Fetches live news from NewsAPI |
webbrowser |
Opens URLs in browser |
pyaudio |
Microphone input support |
- Python 3.11 recommended (3.12 works too)
- A Gemini API key → Get one free here
- A NewsAPI key → Get one free here
git clone https://github.com/Mayurkshirsagar-web/friday-virtual-assistant.git
cd friday-virtual-assistant# Windows
py -3.11 -m venv venv
venv\Scripts\activate
# Mac / Linux
python3.11 -m venv venv
source venv/bin/activateYou should see (venv) appear at the start of your terminal prompt.
pip install -r package_friday.txtWindows users:
pyaudiomay fail to install. If it does, run:pip install pipwin pipwin install pyaudioIf that also fails, download the prebuilt
.whlfrom Gohlke's site and install manually:pip install PyAudio-0.2.14-cp311-cp311-win_amd64.whl
Open main.py and replace the placeholders:
# Line ~12 — Gemini API key
gemini_client = genai.Client(api_key="YOUR_GEMINI_API_KEY_HERE")
# Line ~60 — NewsAPI key
r = requests.get("https://newsapi.org/v2/top-headlines?country=us&apiKey=YOUR_NEWS_API_KEY_HERE")python main.pyFriday will say "Initializing Friday.." — you're good to go.
Say "Friday" → Friday activates and says "What's up!"
Then give a command → Friday responds
Say "deactivate" → Friday shuts down
| Voice Command | What Friday Does |
|---|---|
"Friday" |
Wakes up Friday |
"open google" |
Opens google.com |
"open youtube" |
Opens youtube.com |
"open github" |
Opens github.com |
"open codeforces" |
Opens codeforces.com |
"play [song name]" |
Opens song from music library |
"news" |
Reads top US headlines aloud |
"deactivate" |
Shuts Friday down |
| anything else | Sends to Gemini AI for a smart response |
friday-virtual-assistant/
│
├── main.py # Core assistant logic
├── musicLibrary.py # Song name → URL mapping
├── package_friday.txt # All required packages
└── README.md
Open musicLibrary.py and add songs to the music dictionary:
music = {
"believer": "https://www.youtube.com/watch?v=7wtfhZwyrcc",
"blinding lights": "https://www.youtube.com/watch?v=4NRXx6U8ABQ",
"your song name": "https://youtube-link-here",
}Then just say "Friday, play believer" and it opens in your browser.
Never commit your API keys to GitHub. Use environment variables instead:
import os
gemini_client = genai.Client(api_key=os.environ.get("GEMINI_API_KEY"))Set them in your terminal before running:
# Windows
set GEMINI_API_KEY=your_key_here
# Mac / Linux
export GEMINI_API_KEY=your_key_herePull requests are welcome! Feel free to open an issue for bugs or feature suggestions.
Made by Mayur Kshirsagar