Agya AI is a smart, bilingual (Hindi + English) voice assistant developed in Python. It listens to your commands, speaks back in Hindi, answers using Google's Gemini API, opens websites, plays YouTube videos, and tells the time — all with voice interaction.
- Activates when you say:
hey agya,agya,are you there,hello, etc. - Once active, listens for further commands.
- Uses Google Speech-to-Text to understand spoken input.
- Robust error handling for unclear or failed input.
- Uses Microsoft Edge TTS (
edge-tts) withhi-IN-SwaraNeuralvoice. - Fluent Hindi/English voice output.
open <site>→ Opens websites (e.g.,open linkedinopenshttps://www.linkedin.com)play <video>→ Plays YouTube videos based on the query
- Asks:
what time is it?ortime→ Replies with the current time.
- For all other queries, Agya fetches smart answers from the Gemini AI API (Google).
- Replies in conversational Hindi.
| Module | Purpose |
|---|---|
edge-tts |
Text-to-speech (Hindi) |
speech_recognition |
Converts speech to text |
requests |
Interacts with Gemini API |
playsound |
Plays generated mp3 output |
asyncio |
Handles asynchronous TTS |
tempfile + os |
Temporary audio file management |
.env |
Stores API key securely |
git clone https://github.com/yourusername/agya-ai.git
cd agya-ai
# CREATE A VIRTUAL ENVIRONMENT recommended
python -m venv .venv
.\.venv\Scripts\activate # For Windows