Jarvis AI is a Python-based virtual assistant that can process voice commands, respond using AI-generated text, and provide text-to-speech output. This project integrates Gemini AI API for intelligent responses and utilizes speech recognition and text-to-speech technologies.
- Voice Recognition: Converts spoken input into text using
speech_recognition
. - AI Chatbot: Uses geminiAI's
ChatCompletion
to generate intelligent responses. - Text-to-Speech (TTS): Converts AI-generated responses into speech using
pyttsx3
. - Custom Commands: Can be extended with custom functionalities like weather updates, web searches, or task automation.
Ensure you have Python installed (Python 3.7+ recommended). You can download it from Python.org.
git clone https://github.com/yourusername/JarvisAI.git
cd JarvisAI
Run the following command to install required libraries:
pip install -r requirements.txt
- GeminiAI API Key: Get your API key from geminiai api
- Store the API key in an environment variable or directly in the script:
import google.generativeai genai.configure = "your-api-key-here"
Run the script:
python main.py
- The assistant listens for voice input.
- The voice input is converted into text.
- The text is processed by GeminiAI's model to generate a response.
- The response is spoken aloud using a text-to-speech engine.
- 'say' is not recognized as a command: Use
pyttsx3
instead ofsay
for Windows. - GeminiAI API error: Ensure you are using the correct GeminiAI API format (
ChatCompletion.create()
for newer versions). - Microphone issues: Ensure your microphone is working and set as the default input device.
- Fork the repository.
- Create a new branch:
git checkout -b feature-branch
- Make your changes and commit:
git commit -m "Add new feature"
- Push the branch:
git push origin feature-branch
- Create a Pull Request.
For any questions or suggestions, feel free to open an issue or contact me at [email protected].