This project provides both voice-based and text-based AI assistants using Google's Gemini API. The AI-powered assistants can process user input via text or speech and generate intelligent responses.
Python, APIs, Google Gemini API, AI, Voice Recognition, Speech-to-Text, Text-to-Speech (TTS), Voice Assistant, Automation, Speech Synthesis
Visual Studio Code: https://code.visualstudio.com/ Python: https://www.python.org/downloads/
Follow these steps to set up and run the project on your local machine.
First, clone or download the project from the GitHub repository:
git clone https://github.com/codeIntrovert/GDG-APL-ONE
cd GDG-APL-ONEYou need an API key from Google's AI Studio to use the Gemini AI services.
- Visit Google AI Studio
- Sign in with your Google account
- Generate a free API key
- Save the key for later use
Setting up a virtual environment ensures dependencies don’t interfere with system packages.
py -m venv env # Create virtual environmentActivate the environment:
- Windows:
env\Scripts\activate
- Mac/Linux:
source env/bin/activate
Once the virtual environment is activated, install the dependencies:
pip install -r requirements.txtTo securely store your API key, create a .env file in the project directory and add:
API_KEY=your_gemini_api_key_here
Run the following command to interact with the text-based AI assistant:
py text_gemini.pyRun this command to use the voice-enabled assistant:
py voice_gemini.py📂 alexa-clone
├── 📂 env/ # Virtual environment (ignored in .gitignore)
├── 📂 library/ # Helper modules
├── 📜 text_gemini.py # Text-based AI assistant
├── 📜 voice_gemini.py # Voice-based AI assistant (final outcome)
├── 📜 requirements.txt # Required dependencies
├── 📜 .env # API key storage (not committed to Git)
└── 📜 README.md # Documentation
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser✅ Ensure you've installed all dependencies:
pip install -r requirements.txt✅ Try running the script as a module:
py -m text_gemini✅ Verify your .env file contains the correct API key.
✅ Ensure your internet connection is working.
✅ Text-based AI chat assistant
✅ Voice-based AI assistant
✅ Uses Google's Gemini API for responses
✅ Lightweight and easy to set up
✅ Python-based with minimal dependencies
🔹 Powered by Google Gemini AI
🔹 Inspired by Alexa Voice Assistant
🔹 Project by Google Developer Groups On Campus SSTC
Happy Coding! 🚀