安装音频处理的系统依赖
apt install portaudio19-dev libsox-dev ffmpeg
创建conda环境并安装
conda create -n fish-speech python=3.12
conda activate fish-speech
# GPU 安装 (选择您的 CUDA 版本: cu126, cu128, cu129)
pip install -e .[cu129]
# 仅 CPU 安装
pip install -e .[cpu]
# 默认安装 (使用 PyTorch 官方源)
pip install -e .
下载模型
# 下载模型之前鉴权
hf auth login
#输入token
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
#设置环境变量
git config --global credential.helper store
#下载模型
hf download fishaudio/openaudio-s1-mini --local-dir checkpoints/openaudio-s1-mini
安装编译依赖
pip install torchcodec
安装参考音频处理所需依赖
# Ubuntu/Debian
conda install -c conda-forge ffmpeg
启动
编译方式启动命令(135 tokens/s)
python -m tools.run_webui --compile --device cuda
普通启动命令(15 tokens/s)
python -m tools.run_webui
解决版本错误
torchaudio 版本问题。
list_audio_backends()这个方法在较新版本的 torchaudio 中已经被移除了。
如果你想使用新版本的 torchaudio,需要修改 fish_speech/inference_engine/reference_loader.py 文件:
找到第 34 行附近的代码:
backends = torchaudio.list_audio_backends()
替换为:
# 新版本 torchaudio 的写法
try:
backends = torchaudio.list_audio_backends()
except AttributeError:
# 兼容新版本
backends = []
try:
import soundfile
backends.append('soundfile')
except:
pass
Stephen Young
评论前必须登录!
注册