This project is a voice-powered AI coding assistant that can execute commands on your local machine. It uses Google's Gemini Pro language model, LangChain for building the application logic, and OpenAI's TTS for voice output.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Python 3.8+
- Pip (Python package installer)
- A microphone
-
Clone the repository:
git clone https://github.com/alokdangre/My_Cursor.git cd My_Cursor -
Create and activate a virtual environment (recommended):
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the dependencies:
pip install -r requirements.txt
-
Set up your environment variables:
Create a
.envfile in the root of the project and add your API keys:GOOGLE_GEMINI_API="YOUR_GOOGLE_GEMINI_API_KEY" MIC_DEVICE_INDEX=0 # Optional: Change if you have multiple microphonesYou can find your
MIC_DEVICE_INDEXby running the following Python code:import speech_recognition as sr for index, name in enumerate(sr.Microphone.list_microphone_names()): print(f"Microphone with name \"{name}\" found for `Microphone(device_index={index})`")
To run the application, execute the following command from the root of the project:
python -m app.mainThe application will then start listening for your voice commands.
- Voice-powered: Interact with the assistant using your voice.
- Command execution: The assistant can execute shell commands on your machine.
- AI-powered: Uses Google's Gemini Pro model to understand and respond to your requests.
- Extensible: Built with LangChain, making it easy to add new tools and functionality.
The project uses the following major dependencies:
langchainlanggraphgoogle-generativeaiopenaispeechrecognitionpython-dotenv
A full list of dependencies can be found in the requirements.txt file.