- web/media_server.py: FastAPI service owning the permanent library (library.json + ./media volume), yt-dlp YouTube Music search, queued download jobs with mp3 transcode (ffmpeg), per-room player desired state, and an HTTPS proxy for external live-stream URLs. - agent/media_mcp.py: Hope tools — search_music, play_song, offer_song_choices, pause/resume/stop/skip/seek, now_playing, list_library, add_stream. - agent/agent.py: media toolset wiring + conversation rule (music playing disables the agent mic; re-engaging pauses music). - web UI: slide-out Music panel (search, suggestions, library, live stream add, play/pause, ±10s, seek, volume) with a reconciling poller and media_state data-channel reports. - token server returns the minted room name; nginx serves /media/files as static (native Range) and proxies /media/api to the media server. - supervisord runs media-server; compose mounts ./media and adds ffmpeg to the image.
36 lines
1.5 KiB
YAML
36 lines
1.5 KiB
YAML
services:
|
|
voice:
|
|
build: .
|
|
container_name: voice
|
|
network_mode: host
|
|
environment:
|
|
LIVEKIT_URL: "http://localhost:7880"
|
|
LIVEKIT_API_KEY: "${LIVEKIT_API_KEY:-devkey}"
|
|
LIVEKIT_API_SECRET: "${LIVEKIT_API_SECRET:-hopevoice-devsecret-2026-lan-only}"
|
|
AZURE_SPEECH_KEY: "${AZURE_SPEECH_KEY:?Set AZURE_SPEECH_KEY in .env}"
|
|
AZURE_SPEECH_REGION: "${AZURE_SPEECH_REGION:-eastus}"
|
|
AZURE_TTS_VOICE: "${AZURE_TTS_VOICE:-en-US-Ava:DragonHDOmniLatestNeural}"
|
|
LLM_BASE_URL: "${LLM_BASE_URL:-http://192.168.86.2:3005/api}"
|
|
LLM_MODEL: "${LLM_MODEL:-qwen2.5-vl-3b}"
|
|
LLM_API_KEY: "${LLM_API_KEY:-not-needed}"
|
|
WEB_MCP_ENABLED: "${WEB_MCP_ENABLED:-true}"
|
|
FIRECRAWL_BASE: "${FIRECRAWL_BASE:-http://192.168.86.2:3002}"
|
|
WEB_PORT: "${WEB_PORT:-9178}"
|
|
VOICE_USERS_FILE: "/etc/hope/users.json"
|
|
VOICE_DEFAULT_USER: "${VOICE_DEFAULT_USER:-shane}"
|
|
MEDIA_DIR: "/data/media"
|
|
MEDIA_SERVER_PORT: "${MEDIA_SERVER_PORT:-8092}"
|
|
YTDLP_COOKIES: "${YTDLP_COOKIES:-}"
|
|
volumes:
|
|
- ./livekit.yaml:/etc/livekit.yaml:ro
|
|
- ./certs:/etc/voice/certs
|
|
- ./skills:/skills
|
|
- ./media:/data/media
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "curl -sk https://localhost:$${WEB_PORT:-9178}/ -o /dev/null && curl -s http://localhost:7880/ -o /dev/null && curl -s http://localhost:$${MEDIA_SERVER_PORT:-8092}/media/api/healthz -o /dev/null"]
|
|
interval: 15s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 20s
|
|
restart: unless-stopped
|