Loading repository data…
Loading repository data…
suryanshsk / repository
A Python-based virtual assistant using Gemini AI. Features include voice recognition, text-to-speech, weather updates, news retrieval, jokes, Wikipedia info, and music management. Comes with an interactive web interface. Easily extendable and customizable.
Python-Voice-Assistant-SuryanshskA Python-based virtual assistant using Gemini AI. This assistant is capable of voice recognition, text-to-speech, fetching weather updates, retrieving news, delivering jokes, pulling information from Wikipedia, and managing music. The project also includes an interactive web interface and is designed to be customizable and extendable.
| Name | Logo | Purpose |
|---|---|---|
| GSSoC'2024-Extd | The coding period is from October 1st to October 30th, during which contributors make contributions and earn points on the platform. | |
| Hacktoberfest 2024 | Hacktoberfest is a month-long October event welcoming all skill levels to join the open-source community. |
A sophisticated Python-based virtual assistant utilizing Gemini AI. This project integrates various functionalities to create a versatile and interactive assistant.
Follow these steps to set up the project on your local machine:
Fork the Repository
Clone the Repository
git clone https://github.com/suryanshsk/Python-Voice-Assistant-Suryanshsk.git
Navigate to the Project Directory
cd Python-Voice-Assistant-Suryanshsk
Set Up a Virtual Environment
python -m venv venv
source venv/bin/activate # For Windows: venv\Scripts\activate
Install Dependencies
Install the required dependencies listed in the requirements.txt file:
pip install -r requirements.txt
The requirements.txt file includes the following modules:
speechrecognition==3.8.1
gtts==2.2.3
requests==2.28.1
beautifulsoup4==4.12.0
flask==2.3.2
websocket-client==1.5.1
google-generativeai==0.3.1
request
speechrecognition
pyttsx3
wikipedia
requests
pyjokes
pyarrow==17.0.0
pyasn1==0.6.1
pyasn1_modules==0.4.1
PyAudio==0.2.14
pydeck==0.9.1
Pygments==2.18.0
pypiwin32==223
python-dateutil==2.9.0.post0
python-dotenv==1.0.1
pytz==2024.2
pywin32==307
Additionally, ensure you have the latest version of google-generativeai:
pip install -U google-generativeai
To ensure your Python voice recognition assistant runs smoothly, here's a list of essential packages you should install:
pip install SpeechRecognition
pip install pyaudio
pip install setuptools
To use gTTS (Google Text-to-Speech) in your Python project:
pip install gtts
You are now ready to use the Python Voice Assistant with Gemini AI!
To use the Python Voice Assistant with Gemini AI, you need to configure your API keys. Replace the placeholder keys in the code with your actual API keys as shown below:
Gemini AI API Key:
genai.configure(api_key="GEMINI_API_KEY") # Replace with your actual API key
News API Key:
api_key = 'YOUR_NEWS_API_KEY' # Replace with a real news API key
Weather API Key:
API_KEY = 'YOUR_WEATHER_API_KEY' # Replace with your weather API key
Make sure to replace "GEMINI_API_KEY", 'YOUR_NEWS_API_KEY', and 'YOUR_WEATHER_API_KEY' with your actual API keys to enable the respective functionalities.
We are grateful to all the contributors who have helped improve this project. Your contributions are what make this project better!
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.


For questions or feedback, reach out to suryanshskcontact@gmail.com.
If you encounter any bugs or have suggestions for improvements, please open an issue on GitHub. We appreciate detailed and insightful reports that help us address the issue more effectively.
Configure API Keys
genai.configure(api_key="Your_Own_API_KEY_FOR_GEMINI_AI") # Replace with your actual API key
api_key = 'YOUR_NEWS_API_KEY' # Replace with a real news API key
API_KEY = 'YOUR_WEATHER_API_KEY' # Replace with your weather API key
Run the Application
python main_assistant.py