开源推荐
morning
GitHub 热门项目:hertz-dev
摘要
GitHub项目:hertz-dev 仓库地址:https://github。
the
client
https
you
streamlit
2026-05-18
1 阅读
GitHub Trending
GitHub 项目:hertz-dev
仓库地址:https://github.com/Standard-Intelligence/hertz-dev
星级:1789 | 作者:标准情报
项目描述:全双工会话音频的第一个基础模型
===================================================
自述文件内容:
# 赫兹-dev
Hertz-dev 是一个开源的、首创的全双工会话音频基础模型。
请参阅我们的博客文章了解更多详细信息:https://si.inc/hertz-dev/
## 设置
已知推理可在 Python 3.10 和 CUDA 12.1 上运行。其他版本尚未经过彻底测试。如果您想使用 CUDA 12.1,则需要在运行 `pip install -rrequirements.txt` 之前使用 `pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121` 安装 torch。
在 Ubuntu 上,您可能需要安装 libportaudio:`sudo apt-get install libportaudio2`
所有三个脚本都会自动将模型下载到 `./ckpt` 目录,并且也可以通过 https://ckpt.si.inc/hertz-dev/index.txt 访问检查点
## 用法
我们建议首先使用“inference.ipynb”从提示生成一通道或两通道补全。
然后,您可以使用“inference_client.py”和“inference_server.py”通过麦克风与模型实时对话。
这些目前处于实验阶段,主要在服务器上的 Ubuntu 和客户端上的 MacOS 上进行了测试。
或者,您可以使用“inference_client_webrtc.py”,它基于 [streamlit](https://streamlit.io/) + [streamlit-webrtc](https://github.com/whitphx/streamlit-webrtc) 构建并在浏览器中运行:
````bash
# 安装额外的要求
pip install -r requests_webrtc.txt
# 运行客户端
Streamlit运行inference_client_webrtc.py
````
然后,通过[http://localhost:8501](http://localhost:8501)访问客户端。
**注意**:如果您在 `localhost` 之外的任何地方托管 Streamlit 客户端,则需要使用 https 连接以避免错误(请参阅[此处](https://github.com/whitphx/streamlit-webrtc?tab=readme-ov-file#serving-from-remote-host) 了解更多信息)。一个简单的解决方法是通过端口转发“ssh -L 127.0.0.1:8501:remote-host:8501 user@remote-host”从客户端通过“ssh”连接到服务器,之后您可以像平常一样通过 [http://localhost:8501](http://localhost:8501) 访问客户端。如果通过 https 从远程主机提供服务,您可能需要使用 STUN 服务器来建立连接。您可以通过传递“--use_ice_servers”标志来完成此操作:“streamlit run inference_client_webrtc.py -- --use_ice_servers”。