🎭 JARVIS语音系统
GPU加速语音合成,具有真实的漫威JARVIS语音
](https://www.docker.com/)   
完整的语音助理系统,具有真实的JARVIS语音合成功能,GPU加速,家庭助理集成和Claude Code MCP连接。
______________________________________________________________________
🚀 特性
- ✅ 真实的JARVIS声音:漫威电影级英式英语合成(109MB型号)
- ✅ GPU加速:RTX 5090/4090硬件加速(约2.5秒合成)
- ✅ 家庭助理TTS:智能家居的怀俄明州协议集成
- ✅ 智能对话:具有JARVIS个性的Olama LLaVA模型
- ✅ Claude代码集成:MCP服务器,用于在任何存储库中生成语音
- ✅ web界面:测试和管理界面
- ✅ Docker容器化:易于部署,支持GPU
______________________________________________________________________
⚡ 快速开始
先决条件
- 码头工人 支持NVIDIA GPU
- 英伟达GPU (建议使用RTX 5090/4090以获得最佳性能)
- 语音模型:下载
en_GB-jarvis-high.onnx(109MB正品型号)
1.克隆和设置
git clone https://github.com/comblox/jarvis-voice-system.git
cd jarvis-voice-system
# Download the authentic JARVIS voice model
curl -L "https://huggingface.co/jgkawell/jarvis/resolve/main/en_GB-jarvis-high.onnx" \
-o voices/en_GB-jarvis-high.onnx2.启动系统
# Start GPU-accelerated containers
docker-compose up -d
# Check status
docker-compose ps3.测试语音合成
# Test direct synthesis
curl -X POST http://localhost:5010/api/synthesize \
-H "Content-Type: application/json" \
-d '{"text": "Good evening, sir. All systems are operational."}'
# Open web interface
open http://localhost:5010🔧 配置
Docker编写服务
- piper gpu:主GPU加速TTS服务(端口:10200)
- 风笛手网:用于测试的Web界面(端口:8085)
环境变量
| 变量 | 默认值 | 描述 |
|---|---|---|
PIPER_VOICE | jarvis | 要使用的语音模型 |
CUDA_VISIBLE_DEVICES | 0 | GPU设备(RTX 5090) |
LOG_LEVEL | INFO | 日志记录级别 |
🧪 测试
web界面
- 统一资源定位符: http://localhost:8085
- 特性:实时语音合成、预设JARVIS短语、性能指标
命令行测试
# Run comprehensive tests
./scripts/test-jarvis.sh
# Quick test
curl -X POST http://localhost:10200/synthesize \
-H "Content-Type: application/json" \
-d '{"text": "Good day, sir. JARVIS at your service.", "voice": "jarvis"}' \
--output test.wav预期性能
- RTX 5090:~50-100x实时合成
- 延迟:典型句子\<100ms
- 记忆:\<2GB VRAM使用率
🏠 家庭助理集成
1.添加怀俄明州TTS集成
# In Home Assistant: Settings → Devices & Services → Add Integration
# Search for "Wyoming Protocol"
# Add integration with:
Host: 192.168.50.19
Port: 102002.配置语音助手
# configuration.yaml
tts:
- platform: wyoming
host: 192.168.50.19
port: 10200
voice: jarvis
conversation:
platform: openai_conversation
api_key: !secret openai_api_key
base_url: "http://192.168.50.19:11434/v1" # Ollama LLM3.创建语音管道
- 首选 设置→ 语音助手
- 添加语音助手
- 配置:
- 语音输入:怀俄明州STT(如有)或内置 - 对话代理:OpenAI对话(Ollama) - 文本到语音:怀俄明州TTS(贾维斯)
📊 监控
服务状态
# Check service health
docker-compose ps
curl http://localhost:10200/info
# View logs
docker-compose logs jarvis-piper-gpuGPU利用率
# Monitor GPU usage during synthesis
nvidia-smi -l 1🎭 JARVIS语音功能
Paul Bettany的真实声音
- 源:钢铁侠电影娱乐
- 口音:英国人(en_GB)
- 质量:中等保真度,22.05kHz
- 模型:Glow TTS ONNX格式
优化参数
{
"noise_scale": 0.667,
"length_scale": 1.0,
"noise_w": 0.8,
"speaker_id": 0
}JARVIS短语示例
- “早上好,斯塔克先生。我来做个诊断检查好吗?”
- “所有系统都是名义上的,先生。”
- “我冒昧地监测了你的生命体征。”
- “我该为Mark 42的部署做准备吗?”
- “正在处理,先生。请稍候。”
🔧 故障排除
常见问题
1.集装箱无法启动
# Check GPU support
docker run --rm --gpus all nvidia/cuda:11.8-base-ubuntu20.04 nvidia-smi2.语音合成失败
# Check voice file exists
ls -la voices/jarvis.onnx
# Should be ~63MB3.性能差
# Check GPU utilization
nvidia-smi
# Ensure CUDA_VISIBLE_DEVICES=0 points to RTX 50904.家庭助理无法连接
# Test Wyoming Protocol
curl http://192.168.50.19:10200/info
# Check firewall/network connectivity性能调整
GPU内存优化:
# In docker-compose.yml
environment:
- CUDA_MEMORY_GROWTH=true
- TF_FORCE_GPU_ALLOW_GROWTH=true并发请求:
# Increase container resources
deploy:
resources:
limits:
memory: 8G # Increase for multiple concurrent requests📁 目录结构
jarvis-piper/
├── docker-compose.yml # Container configuration
├── README.md # This file
├── voices/ # Voice model files
│ ├── jarvis.onnx # 63MB voice model (not included)
│ └── jarvis.onnx.json # Voice configuration
├── scripts/ # Installation and testing
│ ├── install.ps1 # Windows PowerShell setup
│ └── test-jarvis.sh # Voice testing script
├── web/ # Web interface
│ └── index.html # Testing web UI
├── cache/ # Model cache (auto-generated)
└── logs/ # Service logs🎯 后续步骤
- 获取JARVIS语音模型 (jarvis.onnx,约63MB)
- 运行安装脚本:
.\scripts\install.ps1 - 测试语音合成: http://localhost:8085
- 配置家庭助手 整合
- 创建语音管道 与Ollama LLM集成
🔗 相关文件
______________________________________________________________________
🎭 “您好,先生。JARVIS随时为您服务。”
