Unofficial Docker Compose setup for running Miso TTS 8B locally on NVIDIA GPUs — especially Windows, Docker Desktop, and RTX 50-series (Blackwell) cards.
This project is not affiliated with Miso Labs. It wraps the upstream inference code with GPU-ready containers, Hugging Face caching, and Windows-friendly launchers.
- Docker Compose with NVIDIA GPU passthrough
- PyTorch 2.11 + CUDA 12.8 for RTX 5090 / Blackwell (
sm_120) - Full bfloat16 model by default (~24 GB VRAM)
- Persistent Hugging Face cache via named Docker volumes
- Preflight checks for gated Llama 3.2 tokenizer access
soundfileaudio I/O patch for PyTorch 2.11 (torchcodecnot required)- Windows
.cmdlaunchers (no PowerShell execution-policy changes needed) - Web voice demo with Whisper STT, optional LLM replies, and dual TTS backends
- Fast mode — Pocket TTS on CPU for low-latency replies
- HTTPS (Caddy) for microphone access from LAN devices
| Item | Notes |
|---|---|
| GPU | NVIDIA with ≥24 GB VRAM recommended for Miso Quality mode |
| Docker | Docker Desktop (Windows) or Docker Engine (Linux) |
| NVIDIA Container Toolkit | GPU passthrough inside containers (Quality mode only) |
| Disk | ~40 GB free for first-run Miso model downloads |
| Hugging Face account | Token + accepted license for meta-llama/Llama-3.2-1B |
Fast mode (Pocket TTS) runs speech synthesis on CPU — no GPU required for TTS.
git clone https://github.com/HappyMonkeyAI/miso-tts-docker.git
cd miso-tts-docker
copy .env.example .envEdit .env and set your Hugging Face token:
HF_TOKEN=hf_your_token_hereAccept the Llama license while logged into the same HF account: https://huggingface.co/meta-llama/Llama-3.2-1B
Verify access:
check-access.cmdbuild.cmdFirst build clones MisoLabsAI/MisoTTS and installs dependencies (~15–25 min depending on network).
run-demo.cmdOutput: output\full_conversation.wav
First inference run downloads ~30–40 GB into the miso-hf-cache Docker volume. Later runs reuse the cache.
Browser demo: hold-to-talk or type messages, Whisper transcribes locally, an LLM writes short replies, and TTS voices the assistant.
Pocket TTS on CPU — snappy replies, no GPU needed for speech:
run-web-fast.cmdrun-web.cmdStarts Pocket TTS (CPU) and Miso 8B (GPU). Switch engines in the web UI.
Browsers require a secure context for microphone access when not using http://localhost. The stack includes Caddy on port 8443 with a self-signed dev certificate.
-
Set your LAN IP in
.env(for phone/tablet access on your network):DEV_CERT_IP=192.168.5.157
-
Generate or refresh certs:
scripts\gen-dev-certs.cmd --force
-
Open:
- This PC: https://localhost:8443
- LAN devices: https://192.168.5.157:8443 (use your
DEV_CERT_IP)
Accept the browser security warning once per device.
Plain HTTP on port 8000 still works for typed messages on localhost only.
Two different keys in .env:
| Variable | Purpose |
|---|---|
HF_TOKEN |
Download Miso/Pocket models and Llama tokenizer |
LLM_API_KEY |
Generate conversational text replies (before TTS) |
Without LLM_API_KEY, the demo uses rotating fallback replies (chat works, but not truly conversational).
OpenRouter (default):
LLM_BASE_URL=https://openrouter.ai/api/v1
LLM_API_KEY=sk-or-v1-your-key-here
LLM_MODEL_NAME=google/gemma-2-9b-it:freeGet a key at https://openrouter.ai/settings/keys
LM Studio (local):
LLM_BASE_URL=http://host.docker.internal:1234/v1
LLM_API_KEY=dummy-key
LLM_MODEL_NAME=your-model-idEnable the OpenAI-compatible server in LM Studio on port 1234. The path must be /v1 — not /api/v1 (LM Studio is not OpenRouter). From inside Docker on Windows, use host.docker.internal instead of your LAN IP.
Ollama (local):
LLM_BASE_URL=http://host.docker.internal:11434/v1
LLM_API_KEY=ollama
LLM_MODEL_NAME=llama3.2After changing .env, recreate the web container (restart alone does not reload env):
docker compose up -d webConfirm at http://localhost:8000/health — "llm_configured": true.
| Control | Description |
|---|---|
| TTS engine | Fast (Pocket CPU) or Quality (Miso GPU) |
| Pocket voice | Alba, Cosette, Charles, and others |
| Miso speaker | Voice A / Voice B |
| Volume / normalize | Playback level and loudness normalization |
| Voice continuity | Miso only — carries tone across turns (can drift) |
Run the web UI on another machine while TTS stays on your GPU box:
MISO_API_URL=http://YOUR_GPU_HOST:8080| Command | Description |
|---|---|
build.cmd |
Build the Miso TTS Docker image |
check-access.cmd |
Verify HF token and Llama tokenizer access |
run-demo.cmd |
Multi-turn CLI conversation demo |
run-generate.cmd "Your text" |
Generate speech from custom text |
run-generate.cmd "Next line" out.wav prompt.wav "prompt transcript" |
Voice continuation |
run-web-fast.cmd |
Web demo — Pocket TTS + HTTPS (CPU, no GPU for speech) |
run-web.cmd |
Web demo — Fast + Quality backends + HTTPS |
scripts\gen-dev-certs.cmd |
Generate self-signed TLS certs for HTTPS |
scripts\gen-dev-certs.cmd --force |
Regenerate certs after IP change |
shell.cmd |
Interactive shell inside the Miso container |
PowerShell scripts (.ps1) are also provided if your execution policy allows them.
| Variable | Default | Description |
|---|---|---|
HF_TOKEN |
— | Hugging Face token (required for Miso) |
MISO_TTS_8B_MODEL |
MisoLabs/MisoTTS |
Model repo or local path |
TTS_BACKEND |
pocket |
Default web engine: pocket or miso |
MISO_API_URL |
http://miso-api:8080 |
Miso GPU TTS API |
POCKET_API_URL |
http://pocket-api:8090 |
Pocket CPU TTS API |
WEB_PORT |
8000 |
HTTP port (localhost typing only) |
WEB_HTTPS_PORT |
8443 |
HTTPS port (microphone access) |
DEV_CERT_IP |
— | LAN IP added to self-signed TLS cert |
LLM_BASE_URL |
https://openrouter.ai/api/v1 |
OpenAI-compatible LLM endpoint |
LLM_API_KEY |
— | LLM API key for smart replies |
LLM_MODEL_NAME |
google/gemma-2-9b-it:free |
Model name for replies |
For lower VRAM (~11–12 GB), use the community INT4 build:
MISO_TTS_8B_MODEL=droyster/MisoTTS-8B-torchao-int4Browser (HTTPS :8443)
→ Caddy (TLS)
→ web (Whisper STT + LLM + WebSocket UI)
→ pocket-api (Fast mode, CPU, streaming TTS)
→ miso-api (Quality mode, GPU, Miso 8B)
Your HF account must accept the Llama license. Run check-access.cmd to confirm.
Use HTTPS (https://localhost:8443 or https://YOUR_LAN_IP:8443), not plain HTTP over a network IP. Run scripts\gen-dev-certs.cmd --force after setting DEV_CERT_IP.
Set LLM_API_KEY in .env, then docker compose up -d web (not just restart).
Rebuild after pulling latest, or ensure scripts/patch_torchaudio.py is mounted. The demo uses scripts/run_demo.py which applies the patch automatically.
Use the .cmd launchers instead.
This image pins PyTorch 2.11 + CUDA 12.8. Rebuild with build.cmd. Do not downgrade to PyTorch 2.4.
docker compose restart web does not reload environment variables. Use:
docker compose up -d web- CONTEXT.md — operating manual for contributors and agents
- HERMES.md — agent workflow rules
- docs/adr/ — architecture decision records
- research/ — external references and notes
- Miso inference: MisoLabsAI/MisoTTS
- Miso weights: MisoLabs/MisoTTS
- Pocket TTS: kyutai-labs/pocket-tts
- Website: misolabs.ai
This wrapper is MIT. Miso TTS inference code and weights are subject to the upstream license. See NOTICE.md.