Skip to content

BradleyMatera/Convo-Ai

Repository files navigation

🗣️ Convo-AI 🤖

Python
FastAPI
Ollama
License: MIT

A conversational AI system with voice + text input, powered by Ollama (local LLM), Whisper speech-to-text, and XTTS v2 text-to-speech.


⚙️ Prerequisites

  • 🐍 Python 3.8+
  • 🎵 FFmpeg (for audio processing)
  • 🦙 Ollama (for local LLM serving)
  • 🎤 A working microphone (for voice input)

📥 Installation

  1. Clone the repo
git clone <repository-url>
cd Convo-Ai
  1. Create a virtual environment
# macOS/Linux
python3 -m venv venv
source venv/bin/activate

# Windows
python -m venv venv
.�env\Scripts�ctivate
  1. Install dependencies
pip install -r requirements.txt
  1. Install FFmpeg
# macOS
brew install ffmpeg

# Ubuntu/Debian
sudo apt-get install ffmpeg

# Windows (Chocolatey)
choco install ffmpeg
  1. Install & start Ollama
# Download: https://ollama.ai/download
ollama serve

▶ Usage

  1. Start the server
source venv/bin/activate   # or .\venv\Scripts\activate on Windows
python server.py
  1. Run the client
source venv/bin/activate
python talk.py
  1. Choose input mode
  • 🎤 Voice → Press r to start/stop recording
  • ⌨ Text → Type and press Enter

✨ Core Features

  • 🎤 Voice and text input modes
  • 🤖 Natural language processing with Ollama
  • 🔊 Text-to-speech output (XTTS v2)
  • 📝 Conversation history & session logging
  • 🎭 Mood analysis
  • 🌐 Optional web interface (FastAPI + WebSocket)
  • 🔒 Privacy-first: all processing runs locally

⚙️ Configuration

Edit config.json to adjust:

  • Voice model
  • Speed & pitch
  • WebSocket URL
  • LLM settings

🛠️ Tech Stack

  • Backend → Python, FastAPI
  • Speech-to-Text → OpenAI Whisper
  • LLM → Ollama (local)
  • TTS → XTTS v2
  • Frontend → HTML + JavaScript
  • Realtime → WebSocket

📁 Project Structure

convo-ai-isolated/
├── src/
│   ├── server.py
│   └── talk.py
├── templates/
│   └── index.html
├── static/
├── logs/
├── tts_cache/
├── config.json
├── requirements.txt
├── README.md
└── HOWTO.md

🛠️ Troubleshooting

  • ✅ Virtual environment activated?
  • ✅ Dependencies installed?
  • ✅ FFmpeg installed?
  • ✅ Ollama running?
  • ✅ Microphone permissions granted?

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit (git commit -m 'Add some AmazingFeature')
  4. Push (git push origin feature/AmazingFeature)
  5. Open a Pull Request

🙏 Acknowledgments


Profile views

About

Local Conversational AI

Resources

License

Stars

Watchers

Forks