Skip to content

andyritchie/alice-ai-server

Repository files navigation

Alice AI Server

Local AI infrastructure for the Alice home assistant system.

🪟 Windows or Linux?

Windows is recommended if you're not comfortable with Linux. All services work on Windows via Docker Desktop.

Guide For
WINDOWS-SETUP.md 👈 Start here - GUI-friendly, beginner-friendly
Setup for Linux Advanced users comfortable with terminal

Overview

This repo contains everything needed to set up a local AI server that powers:

  • Local LLM (Ollama) - Fast responses, zero API costs
  • Local STT (Faster-Whisper) - Speech-to-text
  • Local TTS (Piper + voice clone) - Text-to-speech
  • Local Image Gen (ComfyUI) - Image generation
  • Local Vision (LLaVA) - Camera/image analysis

Architecture

┌─────────────────────────────────────────────────────────────────┐
│                         HOUSE                                    │
├─────────────────────────────────────────────────────────────────┤
│                                                                  │
│   ┌─────────┐    ┌─────────┐    ┌─────────┐    ┌─────────┐     │
│   │Voice PE │    │Voice PE │    │Voice PE │    │Voice PE │     │
│   │ Office  │    │ Kitchen │    │ Bedroom │    │ Living  │     │
│   └────┬────┘    └────┬────┘    └────┬────┘    └────┬────┘     │
│        │              │              │              │           │
│        └──────────────┴──────────────┴──────────────┘           │
│                              │                                   │
│                              ▼                                   │
│                    ┌─────────────────┐                          │
│                    │ Home Assistant  │                          │
│                    │   (Whisper)     │                          │
│                    └────────┬────────┘                          │
│                             │                                    │
│              ┌──────────────┴──────────────┐                    │
│              ▼                              ▼                    │
│    ┌─────────────────┐            ┌─────────────────┐          │
│    │  Alice (Main)   │            │   AI Server     │          │
│    │    OpenClaw     │◄──────────►│   (Ubuntu)      │          │
│    │   Gateway       │            │                 │          │
│    │                 │            │ • Ollama (LLM)  │          │
│    │ • Claude API    │            │ • Whisper (STT) │          │
│    │ • ElevenLabs    │            │ • Piper (TTS)   │          │
│    │ • Tools/Skills  │            │ • ComfyUI       │          │
│    └────────┬────────┘            │ • LLaVA         │          │
│             │                      └─────────────────┘          │
│             ▼                                                    │
│    ┌─────────────────┐                                          │
│    │ Google Speakers │ (TTS output / Music)                     │
│    └─────────────────┘                                          │
│                                                                  │
└─────────────────────────────────────────────────────────────────┘

Hardware Requirements

AI Server (Recommended):

  • GPU: NVIDIA RTX 4090 / 3090 (24GB VRAM) or RTX 4080 (16GB)
  • RAM: 32GB+ (64GB ideal)
  • Storage: 1TB+ NVMe SSD
  • CPU: Modern 8+ core (AMD Ryzen / Intel i7+)

VRAM Usage Estimates:

Service VRAM
Ollama (Llama 3.3 70B Q4) ~40GB
Ollama (Llama 3.3 8B) ~6GB
Ollama (Qwen 2.5 32B Q4) ~20GB
Faster-Whisper large-v3 ~3GB
ComfyUI (SDXL) ~8GB
LLaVA 13B ~10GB

Quick Start

1. Fresh Ubuntu Server Install

# Download Ubuntu Server 22.04 LTS
# Create bootable USB with Rufus/Balena Etcher
# Install with minimal options, enable SSH

2. Run Setup Script

# SSH into server
ssh user@ai-server.local

# Clone this repo
git clone https://github.com/andyritchie/alice-ai-server.git
cd alice-ai-server

# Run setup (installs everything)
chmod +x setup.sh
./setup.sh

3. Configure OpenClaw

Copy the config template and update with your server IP:

cp configs/openclaw-ai-server.json ~/.openclaw/config.json

Directory Structure

alice-ai-server/
├── README.md                 # This file
├── setup.sh                  # Main setup script
├── docker-compose.yml        # All services
├── configs/
│   ├── openclaw-ai-server.json   # OpenClaw config template
│   ├── ollama-models.txt         # Models to pull
│   └── piper-voices.txt          # TTS voices to download
├── scripts/
│   ├── install-nvidia.sh         # NVIDIA driver install
│   ├── install-docker.sh         # Docker setup
│   ├── install-ollama.sh         # Ollama setup
│   ├── install-whisper.sh        # Faster-Whisper setup
│   ├── install-piper.sh          # Piper TTS setup
│   ├── install-comfyui.sh        # ComfyUI setup
│   └── test-all.sh               # Test all services
├── voice-pe/
│   ├── README.md                 # Voice PE setup guide
│   ├── open-voice-pe.yaml        # Custom firmware config
│   └── alice-wakeword/           # Wake word model
├── home-assistant/
│   ├── README.md                 # HA integration guide
│   └── automations.yaml          # Voice command automations
└── docs/
    ├── ARCHITECTURE.md           # Detailed architecture
    ├── TROUBLESHOOTING.md        # Common issues
    └── MODELS.md                 # Model recommendations

Services

Ollama (Local LLM)

Faster-Whisper (STT)

Piper (TTS)

ComfyUI (Image Gen)

Open WebUI (Chat Interface)

OpenClaw Integration

Enable HTTP API

Add to your OpenClaw config:

{
  "gateway": {
    "http": {
      "endpoints": {
        "chatCompletions": { "enabled": true }
      }
    }
  }
}

Model Routing

Configure OpenClaw to route based on task:

{
  "agents": {
    "main": {
      "models": {
        "default": "anthropic/claude-sonnet-4-20250514",
        "fast": "ollama/llama3.3:8b",
        "local": "ollama/qwen2.5:32b"
      }
    }
  }
}

Webhook for Voice Commands

{
  "hooks": {
    "enabled": true,
    "token": "your-secret-token",
    "path": "/hooks"
  }
}

Voice PE Integration

See voice-pe/README.md for:

  • Flashing Open Voice PE firmware
  • Custom "Alice" wake word setup
  • Connecting to OpenClaw

Home Assistant Integration

See home-assistant/README.md for:

  • Assist pipeline configuration
  • Media player routing
  • Voice command automations

Monitoring

Access Portainer for container management:

Costs Saved (Monthly)

Service Cloud Cost Local Cost
ElevenLabs TTS $22/mo $0
Whisper API ~$5/mo $0
Simple LLM queries ~$20/mo $0
Image generation ~$10/mo $0
Total ~$57/mo $0

Plus: Faster responses, full privacy, no rate limits.

Documentation

Doc Description
DEPENDENCIES.md Full checklist of requirements
docs/MODELS.md Which models for which tasks
docs/DOWNLOADING-MODELS.md How to download all models
docs/COMFYUI.md Image generation setup
docs/BROWSER-CONTROL.md Browser automation
docs/WEB-SERVICES.md Hosting dashboards & websites
docs/VOICE-CLONING.md Local voice clone (replace ElevenLabs)
voice-pe/README.md Voice PE + wake word setup

Roadmap

  • Project structure
  • Setup scripts
  • Docker Compose config
  • OpenClaw config templates
  • Model downloading guides
  • ComfyUI documentation
  • Browser control docs
  • Web services / dashboards docs
  • Voice cloning guide
  • Voice PE firmware config
  • Wake word training automation
  • Home Assistant integration
  • Monitoring dashboard

Quick Reference

Service URLs (after setup)

Service URL Purpose
Open WebUI http://ai-server:3000 Chat with local LLMs
ComfyUI http://ai-server:8188 Image generation
Portainer http://ai-server:9000 Container management
Ollama API http://ai-server:11434 LLM inference
Whisper API http://ai-server:8080 Speech-to-text
Piper http://ai-server:10200 Text-to-speech
XTTS http://ai-server:8020 Voice cloning TTS

Useful Commands

# Check GPU
nvidia-smi

# Check containers
docker compose ps

# View logs
docker compose logs -f ollama

# Pull a new model
docker exec ollama ollama pull llama3.2:8b

# Test Ollama
curl http://localhost:11434/api/generate -d '{"model":"llama3.2:8b","prompt":"hi"}'

# Restart a service
docker compose restart whisper

License

MIT

About

Local AI server setup for Alice home assistant - Ollama, Whisper, Piper, ComfyUI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors