All-in-One Docker deployment for Higgs Audio v2 with Web UI, REST API & MCP support
- 🎤 Expressive TTS - State-of-the-art text-to-speech with emotional expression
- 🎭 Zero-Shot Voice Cloning - Clone any voice with just 5-10 seconds of audio
- 👥 Multi-Speaker Dialog - Generate natural conversations with multiple speakers
- 📝 Text Profile Voice - Describe voice characteristics in text, no audio needed
- 📚 Long-form Generation - Auto-chunking for long text with consistent voice
- 🌐 Modern Web UI - Beautiful dark-themed interface with multi-language support
- 🔌 REST API - Full-featured API with Swagger documentation
- 🤖 MCP Support - Model Context Protocol for AI agent integration
- 🐳 One-Click Docker - All-in-one container, no external dependencies
- 🎮 GPU Optimized - Auto-selects the GPU with most free memory
docker run -d --gpus all \
-p 8095:8095 \
-v ~/.cache/huggingface:/app/models \
--name higgs-audio \
neosun/higgs-audio-web:latestThen visit: http://localhost:8095
- NVIDIA GPU with 24GB+ VRAM (e.g., RTX 4090, L40S, A100)
- Docker with NVIDIA Container Toolkit
- Or: Python 3.10+, CUDA 12.x
# Pull the image
docker pull neosun/higgs-audio-web:latest
# Run with GPU support
docker run -d --gpus all \
-p 8095:8095 \
-v ~/.cache/huggingface:/app/models \
-v ./outputs:/app/outputs \
--name higgs-audio \
neosun/higgs-audio-web:latest
# Check logs
docker logs -f higgs-audio
# Verify
curl http://localhost:8095/health# docker-compose.yml
services:
higgs-audio:
image: neosun/higgs-audio-web:latest
ports:
- "8095:8095"
environment:
- NVIDIA_VISIBLE_DEVICES=all
- MODEL_PATH=bosonai/higgs-audio-v2-generation-3B-base
- AUDIO_TOKENIZER_PATH=bosonai/higgs-audio-v2-tokenizer
volumes:
- ~/.cache/huggingface:/app/models
- ./outputs:/app/outputs
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]docker compose up -d# Clone repository
git clone https://github.com/neosun100/higgs-audio-web.git
cd higgs-audio-web
# Create virtual environment
python -m venv venv
source venv/bin/activate # Linux/Mac
# or: venv\Scripts\activate # Windows
# Install dependencies
pip install -r requirements.txt
pip install -e .
pip install fastapi uvicorn python-multipart aiofiles fastmcp soundfile
# Run
python app/main.pygit clone https://github.com/neosun100/higgs-audio-web.git
cd higgs-audio-web
chmod +x start.sh
./start.sh| Variable | Default | Description |
|---|---|---|
PORT |
8095 |
Service port |
NVIDIA_VISIBLE_DEVICES |
all |
GPU device ID(s) |
MODEL_PATH |
bosonai/higgs-audio-v2-generation-3B-base |
Model path |
AUDIO_TOKENIZER_PATH |
bosonai/higgs-audio-v2-tokenizer |
Tokenizer path |
HF_HOME |
~/.cache/huggingface |
HuggingFace cache |
PORT=8095
NVIDIA_VISIBLE_DEVICES=0
MODEL_PATH=bosonai/higgs-audio-v2-generation-3B-base
AUDIO_TOKENIZER_PATH=bosonai/higgs-audio-v2-tokenizerVisit http://localhost:8095 for the web interface with 6 modes:
| Mode | Description |
|---|---|
| Smart Voice | Model auto-selects appropriate voice |
| Preset Voice | Choose from 16 built-in voices |
| Voice Clone | Upload reference audio for cloning |
| Text Profile | Describe voice in text (e.g., "Male, British accent") |
| Multi-Speaker | Generate dialog with [SPEAKER0], [SPEAKER1] tags |
| Long-form | Auto-chunk long text for consistent generation |
curl http://localhost:8095/healthcurl -X POST http://localhost:8095/api/tts \
-H "Content-Type: application/json" \
-d '{"text": "Hello world!", "temperature": 0.3}'curl -X POST http://localhost:8095/api/tts/preset \
-F "text=Hello world!" \
-F "voice=belinda" \
-F "temperature=0.3"curl -X POST http://localhost:8095/api/tts/profile \
-H "Content-Type: application/json" \
-d '{"text": "Good morning!", "profile": "male_en_british"}'curl -X POST http://localhost:8095/api/tts/multispeaker \
-H "Content-Type: application/json" \
-d '{
"text": "[SPEAKER0] Hello!\n[SPEAKER1] Hi there!",
"voices": "belinda,broom_salesman"
}'curl -X POST http://localhost:8095/api/tts/longform \
-H "Content-Type: application/json" \
-d '{"text": "Long text here...", "voice": "belinda", "chunk_size": 100}'Full API documentation: http://localhost:8095/docs
Add to your MCP client config:
{
"mcpServers": {
"higgs-audio": {
"command": "python",
"args": ["app/mcp_server.py"],
"env": {
"MODEL_PATH": "bosonai/higgs-audio-v2-generation-3B-base"
}
}
}
}Available MCP tools:
text_to_speech- Basic TTStext_to_speech_with_voice- TTS with preset voicetext_to_speech_with_profile- TTS with text profiletext_to_speech_multispeaker- Multi-speaker dialoglist_voices/list_profiles- List available optionsget_gpu_status/load_model/unload_model- GPU management
higgs-audio-web/
├── app/
│ ├── main.py # FastAPI server
│ ├── mcp_server.py # MCP server
│ └── static/
│ └── index.html # Web UI
├── boson_multimodal/ # Core model code
├── examples/
│ └── voice_prompts/ # 16 preset voices
├── Dockerfile
├── docker-compose.yml
├── start.sh # One-click launcher
└── requirements.txt
- Model: Higgs Audio v2 (3.6B LLM + 2.2B audio adapter)
- Backend: FastAPI, Uvicorn
- Frontend: Vanilla JS, CSS3
- Container: Docker, NVIDIA Container Toolkit
- ML Framework: PyTorch, Transformers, TorchAudio
| Benchmark | Score |
|---|---|
| EmergentTTS Emotions | 75.7% win rate vs gpt-4o-mini-tts |
| EmergentTTS Questions | 55.7% win rate vs gpt-4o-mini-tts |
| Seed-TTS Eval SIM | 67.70 |
| ESD Emotion SIM | 86.13 |
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing) - Open a Pull Request
- ✨ Multi-speaker dialog generation
- ✨ Text profile voice (no audio needed)
- ✨ Long-form generation with auto-chunking
- 🎨 Enhanced Web UI with 6 generation modes
- 🎉 Initial release
- ✨ Web UI with multi-language support
- ✨ REST API with Swagger docs
- ✨ MCP server integration
- ✨ All-in-one Docker image
- ✨ Auto GPU selection
This project is licensed under the Apache 2.0 License - see the LICENSE file for details.
Based on Higgs Audio v2 by Boson AI.
Made with ❤️ by neosun100

