This project implements an AI bot with voice assistant capabilities that can listen to user queries in any language and respond in the same language. The bot has a customizable character and backstory, maintaining its persona throughout interactions.
- Speech-to-Speech (S2S) system
- Multilingual support for both input and output
- Character-based responses with consistent persona
- Local LLM support using Ollama
- Web interface built with Flask
- Python 3.8+
- Ollama installed on your machine
- Sufficient disk space for LLM models
- Microphone for voice input
- Speakers for voice output
First, you need to install Ollama to run LLMs locally:
For Linux:
curl -fsSL https://ollama.com/install.sh | sh
For macOS/Windows: Visit ollama.com to download and install the software.
After installing Ollama, pull a model:
ollama pull gemma:2b
You can choose different models based on your needs and hardware capabilities.
git clone https://github.com/yourusername/voice-assistant-ai-bot.git
cd voice-assistant-ai-bot
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
voice-assistant-ai-bot/ ├── app/ │ ├── init.py │ ├── config.py │ ├── models.py │ ├── routes.py │ ├── speech.py │ ├── llm.py │ ├── character.py │ └── utils.py ├── static/ │ ├── css/ │ │ └── main.css │ └── js/ │ └── app.js ├── templates/ │ ├── index.html │ └── includes/ │ └── header.html ├── run.py ├── requirements.txt └── README.md
ollama run gemma:2b
This will start the Ollama service with the specified model.
python run.py
The application will be available at http://127.0.0.1:5000/ by default.
- Open the web interface in your browser
- Click the microphone button to start speaking
- Ask your question in any language
- The AI bot will process your query and respond in the same language while maintaining its character
You can modify the bot's character and backstory by editing the character.py
file in the app directory. The file contains personality traits, speech patterns, and backstory elements that define how the bot responds to queries.
- Ollama not responding: Ensure Ollama is running in a separate terminal window
- Microphone not working: Check your browser permissions for microphone access
- Slow responses: Consider using a smaller or more optimized LLM model
This project is licensed under the MIT License - see the LICENSE file for details.
Answer from Perplexity: pplx.ai/share# AI_VERSE_Generative_Gang This is the project made for the AI Verse Hackathon