
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
容器 镜像 运行 构建
https://www.home-assistant.io/ 插件,使用 https://github.com/rhasspy/wyoming-piper 实现文本转语音(TTS)系统,基于 https://www.home-assistant.io/integrations/wyoming/%EF%BC%8C%E8%BF%90%E8%A1%8C%E5%9C%A8 NVIDIA Jetson 设备上。感谢 https://github.com/ms1design 贡献了这些 Home Assistant 及 Wyoming 容器!
home-assistant-core 容器及远程部署的 Home Assistant 兼容piper-tts 容器,在 Jetson 设备上实现 GPU 加速需 Home Assistant
2023.9或更高版本。
docker-compose 示例若要在 Jetson 设备上使用 docker compose 运行 https://github.com/dusty-nv/jetson-containers/tree/master/packages/smart-home/homeassistant-core/ https://www.home-assistant.io/voice_control/ 并启用 cuda,可参考完整示例 https://github.com/dusty-nv/jetson-containers/tree/master/packages/smart-home/wyoming/docker-compose.yaml%EF%BC%9A
yamlname: home-assistant-jetson version: "3.9" services: homeassistant: image: dustynv/homeassistant-core:latest-r36.2.0 restart: unless-stopped init: false privileged: true network_mode: host container_name: homeassistant hostname: homeassistant ports: - "8123:8123" volumes: - ha-config:/config - /etc/localtime:/etc/localtime:ro - /etc/timezone:/etc/timezone:ro piper-tts: image: dustynv/wyoming-piper:master-r36.2.0 restart: unless-stopped network_mode: host container_name: piper-tts hostname: piper-tts runtime: nvidia init: false ports: - "10200:10200/tcp" devices: - /dev/snd:/dev/snd - /dev/bus/usb volumes: - ha-piper-tts-models:/data/models/piper - /etc/localtime:/etc/localtime:ro - /etc/timezone:/etc/timezone:ro volumes: ha-config: ha-piper-tts-models:
| 变量名 | 类型 | 默认值 | 描述 |
|---|---|---|---|
PIPER_PORT | str | 10200 | 主机端口号 |
PIPER_CACHE | str | /data/models/piper | 用于下载模型的默认挂载路径 |
PIPER_UPDATE_VOICES | bool | true | 启动时下载最新 voices.json |
PIPER_LENGTH_SCALE | float | 1.0 | 音素长度 |
PIPER_NOISE_SCALE | float | 0.667 | 生成器噪声 |
PIPER_NOISE_W | float | 0.333 | 音素宽度噪声 |
PIPER_SPEAKER | [str, int] | 0 | 默认语音的说话人名称或ID |
PIPER_VOICE | str | en_US-lessac-high | 默认Piper语音(例如 en_US-lessac-medium),可从https://github.com/rhasspy/piper?tab=readme-ov-file#voices%E9%80%89%E6%8B%A9 |
PIPER_MAX_PROC | int | 1 | 同时运行的最大piper进程数 |
PIPER_DEBUG | bool | true | 记录 DEBUG 级别日志 |
关于 wyoming-piper 的详细配置方法,可参考https://www.home-assistant.io/voice_control/voice_remote_local_assistant#installing-a-local-assist-pipeline%EF%BC%9A
可下载的语音列表请参考https://github.com/rhasspy/piper?tab=readme-ov-file#voices%E3%80%82
如有问题,可通过以下方式获取帮助:
通用 Home Assistant 支持:
/r/homeassistantNVIDIA Jetson 设备Home Assistant支持:
jetson-containers 的bug,请在https://github.com/dusty-nv/jetson-containers/issues%E6%8F%90%E4%BA%A4issue[!NOTE] 本项目由 https://www.jetson-ai-lab.com/research.html 创建。
wyoming-piper:master | |
|---|---|
| 别名 | wyoming-piper |
| 系统要求 | L4T ['>=34.1.0'] |
| 依赖项 | https://github.com/dusty-nv/jetson-containers/tree/master/packages/build/build-essential https://github.com/dusty-nv/jetson-containers/tree/master/packages/smart-home/homeassistant-base https://github.com/dusty-nv/jetson-containers/tree/master/packages/cuda/cuda https://github.com/dusty-nv/jetson-containers/tree/master/packages/cuda/cudnn https://github.com/dusty-nv/jetson-containers/tree/master/packages/build/python https://github.com/dusty-nv/jetson-containers/tree/master/packages/tensorrt https://github.com/dusty-nv/jetson-containers/tree/master/packages/build/cmake/cmake_pip https://github.com/dusty-nv/jetson-containers/tree/master/packages/numpy https://github.com/dusty-nv/jetson-containers/tree/master/packages/onnx https://github.com/dusty-nv/jetson-containers/tree/master/packages/onnxruntime https://github.com/dusty-nv/jetson-containers/tree/master/packages/audio/piper-tts |
| Dockerfile | https://github.com/dusty-nv/jetson-containers/tree/master/packages/smart-home/wyoming/piper/Dockerfile |
| 镜像 | https://hub.docker.com/r/dustynv/wyoming-piper/tags (2024-04-30, 7.4GB)https://hub.docker.com/r/dustynv/wyoming-piper/tags (2024-04-30, 9.0GB) |
| 说明 | 基于 wyoming 协议的 piper-tts,用于Home Assistant。基于 https://github.com/home-assistant/addons/tree/master/piper 和 https://github.com/rhasspy/wyoming-piper |
启动容器可使用 https://github.com/dusty-nv/jetson-containers/tree/master/docs/run.md 和 https://github.com/dusty-nv/jetson-containers/tree/master/docs/run.md#autotag%EF%BC%8C%E6%88%96%E6%89%8B%E5%8A%A8%E6%9E%84%E9%80%A0 https://docs.docker.com/engine/reference/commandline/run/ 命令:
bash# 自动拉取或构建兼容的容器镜像 jetson-containers run $(autotag piper) # 若使用 'docker run'(需指定镜像及挂载等参数) sudo docker run --runtime nvidia -it --rm --network=host piper:35.2.1
https://github.com/dusty-nv/jetson-containers/tree/master/docs/run.md 将参数转发给 https://docs.docker.com/engine/reference/commandline/run/%EF%BC%8C%E5%B9%B6%E6%B7%BB%E5%8A%A0%E9%83%A8%E5%88%86%E9%BB%98%E8%AE%A4%E9%85%8D%E7%BD%AE%EF%BC%88%E5%A6%82
--runtime nvidia、挂载/data缓存、检测设备)
https://github.com/dusty-nv/jetson-containers/tree/master/docs/run.md#autotag 会查找与JetPack/L4T版本兼容的容器镜像——本地镜像、仓库拉取或构建新镜像均可。
如需将主机目录挂载到容器,使用 https://docs.docker.com/engine/reference/commandline/run/#volume 或 https://docs.docker.com/engine/reference/commandline/run/#volume 标志:
bashjetson-containers run -v /主机路径:/容器路径 $(autotag piper)
如需启动容器并运行命令(非交互式shell):
bashjetson-containers run $(autotag piper) my_app --abc xyz
可传递任何 https://docs.docker.com/engine/reference/commandline/run/ 支持的选项,执行前会打印完整命令。
若按上述方式使用 https://github.com/dusty-nv/jetson-containers/tree/master/docs/run.md#autotag%EF%BC%8C%E5%BF%85%E8%A6%81%E6%97%B6%E4%BC%9A%E8%87%AA%E5%8A%A8%E6%8F%90%E7%A4%BA%E6%9E%84%E5%BB%BA%E5%AE%B9%E5%99%A8%E3%80%82%E5%A6%82%E9%9C%80%E6%89%8B%E5%8A%A8%E6%9E%84%E5%BB%BA%EF%BC%8C%E5%85%88%E5%AE%8C%E6%88%90https://github.com/dusty-nv/jetson-containers/tree/master/docs/setup.md%EF%BC%8C%E7%84%B6%E5%90%8E%E8%BF%90%E8%A1%8C%EF%BC%9A
bashjetson-containers build piper
上述依赖项将被构建到容器中,并在构建过程中进行测试。运行时可添加 https://github.com/dusty-nv/jetson-containers/tree/master/jetson_containers/build.py 获取构建选项。
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务