Speak with AI - Run locally using Ollama, OpenAI or xAI - Speech uses XTTS, OpenAI or ElevenLabs
10K+
Voice Chat AI allows you to interact with AI characters using speech. Choose between various characters, each with unique personalities and voices. Run locally with Ollama, or use cloud providers like OpenAI, Anthropic, or xAI.
Mix and match: Use ElevenLabs voices with Ollama models, OpenAI TTS with Anthropic chat, or run completely locally with Spark-TTS voice cloning.
WebRTC Real-Time: Experience instant conversations with OpenAI's Realtime API - interrupt the AI and get immediate responses.
Full Documentation: https://github.com/bigsk1/voice-chat-aiā
Windows with WSL2:
docker run -d \
-e "PULSE_SERVER=/mnt/wslg/PulseServer" \
-v \\wsl$\Ubuntu\mnt\wslg:/mnt/wslg/ \
-v ./elevenlabs_voices.json:/app/elevenlabs_voices.json \
--env-file .env \
--name voice-chat-ai \
-p 8000:8000 \
bigsk1/voice-chat-ai:latest
Linux/WSL2 Ubuntu:
docker run -d \
-e "PULSE_SERVER=/mnt/wslg/PulseServer" \
-v /mnt/wslg/:/mnt/wslg/ \
-v ./elevenlabs_voices.json:/app/elevenlabs_voices.json \
--env-file .env \
--name voice-chat-ai \
-p 8000:8000 \
bigsk1/voice-chat-ai:latest
Native Linux (PulseAudio):
docker run -d \
-e PULSE_SERVER=unix:/tmp/pulse/native \
-v ~/.config/pulse/cookie:/root/.config/pulse/cookie:ro \
-v /run/user/$(id -u)/pulse:/tmp/pulse:ro \
-v ./elevenlabs_voices.json:/app/elevenlabs_voices.json \
--env-file .env \
--name voice-chat-ai \
-p 8000:8000 \
bigsk1/voice-chat-ai:latest
Requirements: NVIDIA GPU, nvidia-container-toolkit, CUDA drivers
Windows with WSL2:
docker run -d --gpus all \
-e "PULSE_SERVER=/mnt/wslg/PulseServer" \
-v \\wsl$\Ubuntu\mnt\wslg:/mnt/wslg/ \
-v ./elevenlabs_voices.json:/app/elevenlabs_voices.json \
--env-file .env \
--name voice-chat-ai-cuda \
-p 8000:8000 \
bigsk1/voice-chat-ai:cuda
Linux/WSL2 Ubuntu:
docker run -d --gpus all \
-e "PULSE_SERVER=/mnt/wslg/PulseServer" \
-v /mnt/wslg/:/mnt/wslg/ \
-v ./elevenlabs_voices.json:/app/elevenlabs_voices.json \
--env-file .env \
--name voice-chat-ai-cuda \
-p 8000:8000 \
bigsk1/voice-chat-ai:cuda
CPU:
services:
voice-chat-ai:
image: bigsk1/voice-chat-ai:latest
container_name: voice-chat-ai
ports:
- "8000:8000"
env_file:
- .env
environment:
- PULSE_SERVER=/mnt/wslg/PulseServer
volumes:
- /mnt/wslg/:/mnt/wslg/
- ./elevenlabs_voices.json:/app/elevenlabs_voices.json
restart: unless-stopped
CUDA:
services:
voice-chat-ai-cuda:
image: bigsk1/voice-chat-ai:cuda
container_name: voice-chat-ai-cuda
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
ports:
- "8000:8000"
env_file:
- .env
environment:
- PULSE_SERVER=/mnt/wslg/PulseServer
volumes:
- /mnt/wslg/:/mnt/wslg/
- ./elevenlabs_voices.json:/app/elevenlabs_voices.json
restart: unless-stopped
Create a .env file with your settings:
# LLM Provider (ollama, openai, anthropic, xai)
MODEL_PROVIDER=ollama
OLLAMA_MODEL=llama3:latest
OLLAMA_BASE_URL=http://localhost:11434
# OpenAI (optional)
OPENAI_API_KEY=sk-...
OPENAI_MODEL=gpt-4o-mini
# Anthropic (optional)
ANTHROPIC_API_KEY=sk-ant-...
ANTHROPIC_MODEL=claude-3-5-sonnet-20241022
# xAI (optional)
XAI_API_KEY=xai-...
XAI_MODEL=grok-2-latest
# TTS Provider (sparktts, openai, elevenlabs, kokoro)
TTS_PROVIDER=openai
# ElevenLabs (optional)
ELEVENLABS_API_KEY=...
# Transcription (openai or local)
TRANSCRIPTION_PROVIDER=openai
FASTER_WHISPER_LOCAL=false
# Default character
CHARACTER_NAME=samantha
Access: http://localhost:8000ā
Experience immersive narrative adventures with AI characters. Each story has unique plot lines, choices, and outcomes.
Play interactive games with specialized game master characters:
For local zero-shot voice cloning inside the container:
# Enter container
docker exec -it voice-chat-ai bash
# Run setup script (GPU recommended)
python setup_sparktts.py
# Restart container
exit
docker restart voice-chat-ai
Set TTS_PROVIDER=sparktts in your .env file.
Model size: ~2GB download (Hugging Face)
latest - Latest stable release (CPU, Python 3.11-slim)cuda - CUDA 12.4 support for GPU accelerationv1.0.0 - Specific version tagsmain - Development branch (may be unstable)| Variable | Options | Default | Description |
|---|---|---|---|
MODEL_PROVIDER | ollama, openai, anthropic, xai | ollama | LLM provider |
TTS_PROVIDER | sparktts, openai, elevenlabs, kokoro | openai | Text-to-speech service |
TRANSCRIPTION_PROVIDER | openai, local | openai | Speech-to-text service |
CHARACTER_NAME | Any character folder name | samantha | Default character |
FASTER_WHISPER_LOCAL | true, false | false | Use local Whisper for transcription |
OLLAMA_BASE_URL | URL | http://localhost:11434 | Ollama API endpoint |
Full configuration guide: https://github.com/bigsk1/voice-chat-ai#configurationā
For better performance and audio support, we recommend native installation over Docker:
git clone https://github.com/bigsk1/voice-chat-ai.git
cd voice-chat-ai
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install PyTorch (choose CPU or CUDA)
pip install torch torchaudio torchvision --index-url https://download.pytorch.org/whl/cpu
# Install dependencies
pip install -r requirements.txt
git clone https://github.com/bigsk1/voice-chat-ai.git
cd voice-chat-ai
uv sync # Creates venv and installs everything
Start: uvicorn app.main:app --host 0.0.0.0 --port 8000
If microphone doesn't work in WSL2:
# In WSL2
sudo apt-get update
sudo apt-get install pulseaudio
pulseaudio --start
Verify GPU access in container:
docker exec -it voice-chat-ai-cuda nvidia-smi
If Spark-TTS or Whisper models fail to download, check:
More troubleshooting: https://github.com/bigsk1/voice-chat-ai#troubleshootingā
šØ Breaking Changes:
⨠New Features:
pyproject.toml for modern dependency managementUpgrade Guide: https://github.com/bigsk1/voice-chat-ai/releases/tag/v1.0.0ā
Contributions welcome! Please read our contributing guidelines and submit pull requests.
Areas for contribution:
MIT License - See LICENSEā
If you find this project useful, please consider:
Made with ā¤ļø by bigsk1ā
Content type
Image
Digest
sha256:c47d2a995ā¦
Size
852 MB
Last updated
2 days ago
docker pull bigsk1/voice-chat-ai