
如果你使用 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-satellite 在 NVIDIA Jetson 设备上通过 https://www.home-assistant.io/integrations/wyoming/ 实现远程语音https://www.home-assistant.io/integrations/wyoming#satellites%E5%8A%9F%E8%83%BD%E3%80%82%E6%84%9F%E8%B0%A2 https://github.com/ms1design 贡献这些 Home Assistant 和 Wyoming 容器!
STT)TTS)要求 Home Assistant
2023.9或更高版本。
docker-compose 示例若要在启用 cuda 的 Jetson 设备上使用 docker compose 运行 https://github.com/dusty-nv/jetson-containers/tree/master/packages/smart-home/homeassistant-core/ https://www.home-assistant.io/voice_control/%EF%BC%8C%E5%8F%AF%E5%8F%82%E8%80%83%E5%AE%8C%E6%95%B4%E7%A4%BA%E4%BE%8B https://github.com/dusty-nv/jetson-containers/tree/master/packages/smart-home/wyoming/docker-compose.yaml%E3%80%82
yamlname: home-assistant-jetson version: "3.9" services: homeassistant: image: docker.xuanyuan.run/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 assist-microphone: image: docker.xuanyuan.run/dustynv/wyoming-assist-microphone:latest-r36.2.0 restart: unless-stopped network_mode: host container_name: assist-microphone hostname: assist-microphone runtime: nvidia init: false ports: - "10700:10700/tcp" devices: - /dev/snd:/dev/snd - /dev/bus/usb volumes: - ha-assist-microphone:/share - /etc/localtime:/etc/localtime:ro - /etc/timezone:/etc/timezone:ro environment: SATELLITE_AUDIO_DEVICE: "plughw:CARD=S330,DEV=0" SATELLITE_SND_VOLUME_MULTIPLIER: 0.3 WAKEWORD_NAME: "ok_nabu" ASSIST_PIPELINE_NAME: "Home Assistant" volumes: ha-config: ha-assist-microphone:
| 变量 | 类型 | 默认值 | 描述 |
|---|---|---|---|
SATELLITE_NAME | str | assist microphone | 卫星名称 |
SATELLITE_AUDIO_DEVICE | str | plughw:CARD=S330,DEV=0 | 选择的音频设备,详见下文 |
SATELLITE_PORT | str | 10700 | 卫星服务端口 |
SATELLITE_SOUND_ENABLED | bool | true | 启用或禁用连接的扬声器 |
SATELLITE_AWAKE_WAV | str | /usr/src/sounds/awake.wav | 检测到唤醒词时播放的WAV文件 |
SATELLITE_DONE_WAV | str | /usr/src/sounds/done.wav | 语音命令完成时播放的WAV文件 |
ASSIST_PIPELINE_NAME | str | Home Assistant | 要运行的Home Assistant语音助手管道名称 |
WAKEWORD_SERVICE_URI | str | tcp://127.0.0.1:10400 | Wyoming唤醒词检测服务的URI |
WAKEWORD_NAME | str | ok_nabu | 要监听的唤醒词名称 |
SATELLITE_SND_VOLUME_MULTIPLIER | float | 1.0 | 扬声器音量乘数 |
SATELLITE_MIC_VOLUME_MULTIPLIER | float | 1.0 | 麦克风音量乘数 |
SATELLITE_MIC_AUTO_GAIN | int | 0 | 麦克风自动增益 |
SATELLITE_MIC_NOISE_SUPPRESSION | int | 0 | 麦克风噪声抑制(0-4) |
SATELLITE_DEBUG | bool | true | 记录DEBUG级别的日志 |
有关 wyoming-assist-microphone 的详细配置方法,请参考 https://www.home-assistant.io/voice_control/voice_remote_local_assistant#installing-a-local-assist-pipeline%E3%80%82
选择正确的麦克风/扬声器设备对卫星功能至关重要。
列出可用麦克风:
basharecord -L
列出可用扬声器:
bashaplay -L
两个命令的输出应类似如下:
bashplughw:CARD=seeed2micvoicec,DEV=0 seeed-2mic-voicecard, bcm2835-i2s-wm8960-hifi wm8960-hifi-0 Hardware device with all software conversions
建议选择以 plughw: 开头的设备,或在不确定时使用 default。推荐选择标注有“Hardware device with all software conversions”的麦克风和扬声器。将环境变量 SATELLITE_AUDIO_DEVICE 设置为:
bashplughw:CARD=seeed2micvoicec,DEV=0
wyoming-assist-microphone使用同一设备作为麦克风和扬声器。
ASSIST_PIPELINE_NAME 指定对话管道名称时,用户是否应在Home Assistant Assist聊天弹窗中看到语音命令和响应的转录文本。SATELLITE_AUDIO_DEVICE 拆分为 SATELLITE_MIC_DEVICE 和 SATELLITE_SND_DEVICE,以支持选择不同的音频硬件组合。有问题?您可以通过以下方式获取帮助:
/r/homeassistantjetson-containers bug,请在https://github.com/dusty-nv/jetson-containers/issues[!NOTE] 本项目由 https://www.jetson-ai-lab.com/research.html 创建。
wyoming-assist-microphone:latest | |
|---|---|
| 别名 | wyoming-assist-microphone |
| 要求 | 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/build/python |
| Dockerfile | https://github.com/dusty-nv/jetson-containers/tree/master/packages/smart-home/wyoming/assist-microphone/Dockerfile |
| 镜像 | https://hub.docker.com/r/dustynv/wyoming-assist-microphone/tags (2024-04-30, 5.1GB)https://hub.docker.com/r/dustynv/wyoming-assist-microphone/tags (2024-04-30, 0.3GB) |
| 说明 | 使用wyoming协议的assist-microphone,用于Home Assistant。基于https://github.com/home-assistant/addons/tree/master/assist_microphone |
要启动容器,可以使用 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%E5%BB%BA https://docs.docker.com/engine/reference/commandline/run/ 命令:
bash# 自动拉取或构建兼容的容器镜像 jetson-containers run $(autotag assist-microphone) # 或使用'docker run'(指定镜像和挂载等) sudo docker run --runtime nvidia -it --rm --network=host assist-microphone: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%E4%B8%80%E4%BA%9B%E9%BB%98%E8%AE%A4%E5%80%BC%EF%BC%88%E5%A6%82%60--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 assist-microphone)
要启动容器运行命令(而非交互式shell):
bashjetson-containers run $(autotag assist-microphone) 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%E6%8F%90%E7%A4%BA%E6%82%A8%E6%9E%84%E5%BB%BA%E5%AE%B9%E5%99%A8%E3%80%82%E8%A6%81%E6%89%8B%E5%8A%A8%E6%9E%84%E5%BB%BA%EF%BC%8C%E8%AF%B7%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 assist-microphone
上述依赖项将被构建到容器中,并在构建过程中进行测试。运行时添加 https://github.com/dusty-nv/jetson-containers/tree/master/jetson_containers/build.py 可查看构建选项。
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务