A simple voice assistant that listens, processes speech, and responds using a custom language model powered by Ollama.
Warning
This project was not made for Windows or macOS. It is designed to work on Linux.
- Real-time speech recognition and conversion to text.
- Customizable conversational model using Ollama.
- Audible responses with Text-to-Speech (TTS).
- Simple Tkinter-based UI to display spoken text and assistant's replies.
-
System utilities:
sudo apt-get install pulseaudio-utils alsa-utils pactl aplay
(for microphone volume control and TTS).
-
Ollama:
- Install the Ollama client from Ollama's website
- Pull
gemma2:2b
or your preferred model (you will need to modify model.cfg):ollama pull gemma2:2b
.
-
Install Python dependencies:
pip install -r requirements.txt
You can customize the assistant's name by modifying the NAME variable in main.py (default is "alex"). This name is used to trigger the assistant's listening and responses.
For example, change the name in the script to something like:
NAME = "your_custom_name"
- Clone the repository and install dependencies.
- Run the assistant with:
python main.py
- The assistant listens for commands, processes them, and provides responses in both text and speech.
- To stop the application, press Ctrl+C.