Add self-deploying setup scripts for all sub-projects (P1-P8)
- Root setup.sh orchestrator with per-phase dispatch (./setup.sh p1..p8 | all | status) - Makefile convenience targets (make infra, make llm, make status, etc.) - scripts/common.sh: shared bash library for OS detection, Docker helpers, service management (launchd/systemd), package install, env management - .env.example + .gitignore: shared config template and secret exclusions P1 (homeai-infra): full implementation - docker-compose.yml: Uptime Kuma, code-server, n8n - Note: Home Assistant, Portainer, Gitea are pre-existing instances - setup.sh: Docker install, homeai network, container health checks P2 (homeai-llm): full implementation - Ollama native install with CUDA/ROCm/Metal auto-detection - launchd plist (macOS) + systemd service (Linux) for auto-start - scripts/pull-models.sh: idempotent model puller from manifest - scripts/benchmark.sh: tokens/sec measurement per model - Open WebUI on port 3030 (avoids Gitea :3000 conflict) P3-P8: working stubs with prerequisite checks and TODO sections Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
93
homeai-voice/setup.sh
Normal file
93
homeai-voice/setup.sh
Normal file
@@ -0,0 +1,93 @@
|
||||
#!/usr/bin/env bash
|
||||
# homeai-voice/setup.sh — P3: Voice pipeline (STT / TTS / Wyoming)
|
||||
#
|
||||
# Components:
|
||||
# - Whisper.cpp — speech-to-text (Apple Silicon / CUDA optimised)
|
||||
# - wyoming-faster-whisper — Wyoming STT adapter (port 10300)
|
||||
# - Kokoro TTS — fast text-to-speech via ONNX
|
||||
# - wyoming-kokoro — Wyoming TTS adapter (port 10301)
|
||||
# - Chatterbox TTS — voice cloning (MPS / CUDA)
|
||||
# - openWakeWord — always-on wake word detection
|
||||
#
|
||||
# Prerequisites:
|
||||
# - P1 (homeai-infra) completed — Home Assistant running
|
||||
# - P2 (homeai-llm) completed — Ollama running
|
||||
# - Python 3.10+ installed
|
||||
# - macOS: Xcode Command Line Tools (for whisper.cpp compilation)
|
||||
# - Linux: build-essential, cmake
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
REPO_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)"
|
||||
source "${REPO_DIR}/scripts/common.sh"
|
||||
|
||||
log_section "P3: Voice Pipeline"
|
||||
detect_platform
|
||||
|
||||
# ─── Prerequisite check ────────────────────────────────────────────────────────
|
||||
log_info "Checking prerequisites..."
|
||||
|
||||
prereq_ok=true
|
||||
|
||||
if ! curl -sf http://localhost:8123 -o /dev/null 2>/dev/null; then
|
||||
log_warn "Home Assistant (P1) not reachable at :8123"
|
||||
prereq_ok=false
|
||||
fi
|
||||
|
||||
if ! curl -sf http://localhost:11434 -o /dev/null 2>/dev/null; then
|
||||
log_warn "Ollama (P2) not reachable at :11434"
|
||||
prereq_ok=false
|
||||
fi
|
||||
|
||||
if ! command_exists python3; then
|
||||
log_warn "python3 not found — required for STT/TTS adapters"
|
||||
prereq_ok=false
|
||||
fi
|
||||
|
||||
if [[ "$prereq_ok" == "false" ]]; then
|
||||
log_warn "Prerequisites not met. Complete P1 and P2 first."
|
||||
fi
|
||||
|
||||
# ─── TODO: Implementation ──────────────────────────────────────────────────────
|
||||
cat <<'EOF'
|
||||
|
||||
┌─────────────────────────────────────────────────────────────────┐
|
||||
│ P3: homeai-voice — NOT YET IMPLEMENTED │
|
||||
│ │
|
||||
│ Implementation steps (see homeai-voice/PLAN.md): │
|
||||
│ │
|
||||
│ 1. whisper/install.sh │
|
||||
│ - Clone + compile whisper.cpp (Metal/CUDA flags) │
|
||||
│ - Download models: large-v3, medium.en │
|
||||
│ - Install wyoming-faster-whisper Python package │
|
||||
│ │
|
||||
│ 2. tts/install-kokoro.sh │
|
||||
│ - pip install kokoro-onnx │
|
||||
│ - Install wyoming-kokoro adapter │
|
||||
│ │
|
||||
│ 3. tts/install-chatterbox.sh │
|
||||
│ - pip install chatterbox-tts │
|
||||
│ - Verify MPS (macOS) or CUDA (Linux) acceleration │
|
||||
│ │
|
||||
│ 4. wyoming/install.sh │
|
||||
│ - Install wyoming-openwakeword │
|
||||
│ - Configure wake word: hey_jarvis │
|
||||
│ │
|
||||
│ 5. scripts/launchd/ or systemd/ │
|
||||
│ - wyoming-stt (port 10300) │
|
||||
│ - wyoming-tts (port 10301) │
|
||||
│ - wakeword daemon │
|
||||
│ │
|
||||
│ 6. wyoming/test-pipeline.sh │
|
||||
│ - End-to-end smoke test │
|
||||
│ │
|
||||
│ Interface contracts: │
|
||||
│ WYOMING_STT_URL=tcp://localhost:10300 │
|
||||
│ WYOMING_TTS_URL=tcp://localhost:10301 │
|
||||
└─────────────────────────────────────────────────────────────────┘
|
||||
|
||||
EOF
|
||||
|
||||
log_info "P3 is not yet implemented. See homeai-voice/PLAN.md for details."
|
||||
exit 0
|
||||
Reference in New Issue
Block a user