A Python-based voice assistant that listens to user commands, performs system tasks, and uses a LangChain tool-calling agent for intelligent responses.
- Voice input using microphone
- Text-to-speech response
- Open websites by voice
- Open Windows applications
- Tell current time
- AI responses using OpenAI via LangChain
- Tool calling support (search, wiki, save)
- User speaks through microphone
- Speech is converted to text
- System checks for:
- Website commands
- System commands
- If no system command is found:
- Query is sent to LangChain agent
- Agent processes the query using tools
- Response is spoken back to the user
AI-Voice-Agent/ │ ├── main.py # Main voice assistant
├── sources.py # Custom tools (search, wiki, save)
├── requirements.txt
├── .env.example
├── README.md
git clone https://github.com/Eamon2009/AI-Agent-plus.git
cd AI-Voice-Agent
Windows:
python -m venv venv
venv\Scripts\activate
Mac/Linux:
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
Rename cofig.env to .env
Add your OpenAI API key:
OPENAI_API_KEY=your_api_key
Get your API key from: https://platform.openai.com/api-keys
Run the assistant:
python main.py
Say commands like:
- "Open YouTube"
- "Open Google"
- "What is the time"
- "Open calculator"
- "Explain Python loops"
- "Stop"
- YouTube
- Wikipedia
- GitHub
- Stack Overflow
- Calculator
- Notepad
- Camera
Any other query is handled by the LangChain agent.
- OpenAI GPT-3.5 via LangChain
- SpeechRecognition
- pyttsx3 (offline speech)
- Custom tools:
- search_tool
- wiki_tool
- save_mth
- Microphone is required
- Works best on Windows (uses SAPI5)
- Ensure internet connection for AI responses
- Memory support
- GUI interface
- Wake word detection
- Cross-platform support
MIT License