Skip to main content

在reComputer Jetson上部署Dia

介绍​

AI驱动的语音合成技术的快速发展使得高质量、实时的文本转语音(TTS)应用能够在各个领域中得到应用。在这些技术中,Dia作为一个高效且富有表现力的神经语音生成模型脱颖而出,能够以最小的计算开销产生自然的音频。这使得它特别适合部署在边缘设备上,例如NVIDIA Jetson系列,由于其性能和功耗效率的平衡,这些设备在嵌入式AI应用中被广泛使用。

在本文中,我们探索了在Jetson设备上部署Dia TTS模型的过程,并演示了其在推理过程中的性能。

先决条件​

  • 具有超过8GB内存的Jetson设备。
  • Jetson设备需要预先刷入jetpack 6.1操作系统或更高版本。
note

在本wiki中,我们将使用reComputer J4012 - 配备NVIDIA® Jetson™ Orin™ NX 16GB的边缘AI计算机来完成以下任务,但您也可以尝试使用其他Jetson设备。

开始使用​

硬件连接​

  • 将 Jetson 设备连接到网络、鼠标、键盘和显示器。
note

当然,您也可以通过本地网络使用 SSH 远程访问 Jetson 设备。

安装依赖项​

  1. 请从这里下载并解压适合您的 Jetson 设备的相应依赖项。
  1. 在您的 Jetson 设备上,在终端中执行以下命令进行安装:
pip install torch-2.7.0-cp310-cp310-linux_aarch64.whl
pip install torchaudio-2.7.0-cp310-cp310-linux_aarch64.whl
pip install triton-3.3.0-cp310-cp310-linux_aarch64.whl

Download and Install Dia​

  1. 使用以下终端命令在您的 Jetson 设备上克隆 Dia 的源代码:
git clone https://github.com/nari-labs/dia.git
  1. 编辑安装文件。

注释掉 torch、torchaudio 和 triton 相关的设置。使用 Vim 打开 pyproject.toml 并禁用第 19-22 行。

cd dia
vim pyproject.toml
note

记住在退出前保存更改。

  1. 安装 dia 的运行环境。
pip install -e .
pip install numpy==1.26.4
  1. 启动 Dia
export GRADIO_SERVER_NAME=0.0.0.0
python app.py
info

为了便于远程访问 Gradio WebUI,我重新配置了 GRADIO_SERVER_NAME 环境变量。

演示​

在演示视频中,我使用 DeepSeek 生成了一段介绍 Seeed Studio 的对话,然后直接将文本输入到 DIA 中生成音频。尽管我的提示词没有使用任何特殊技巧,生成的音频质量仍然令人印象深刻。

[S1] Hey, have you heard of Seeed Studio?
[S2] Of course! It's a company focused on open-source hardware right?
[S1] Exactly! They offer a wide range of development boards, sensor modules, and edge computing devices, perfect for makers, engineers, and developers to quickly bring their ideas to life.
[S2] Yeah, and their Grove ecosystem is really famous—its modular design makes hardware connections super easy, no messy soldering or wiring needed.
[S1] True! They also run Seeed Fusion, providing small-batch PCB manufacturing and assembly services, which is great for startups and hardware entrepreneurs.
[S2] Plus, their community and documentation are well-developed, and many of their projects are open-source, making them beginner-friendly!
[S1] In short, if you're into DIY smart hardware or IoT projects, Seeed Studio is an awesome choice!
[S2] Couldn’t agree more!

参考资料​

技术支持与产品讨论​

感谢您选择我们的产品!我们在这里为您提供不同的支持,以确保您使用我们产品的体验尽可能顺畅。我们提供多种沟通渠道,以满足不同的偏好和需求。

Loading Comments...