Update fish-speech-integration.md

This commit is contained in:
Alireza Jahanshahlou 2025-10-12 17:32:09 +03:30 committed by GitHub
parent 35df20fc41
commit 35d51f38d7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,72 +1,72 @@
登录AutoDL,租赁镜像
选择镜像:
Log in to AutoDL and rent an image
Select Mirror:
```
PyTorch / 2.1.0 / 3.10(ubuntu22.04) / cuda 12.1
PyTorch/2.1.0/3.10(ubuntu22.04)/cuda 12.1
```
机器开机后,设置学术加速
After the machine is turned on, set academic acceleration
```
source /etc/network_turbo
```
进入工作目录
Enter the working directory
```
cd autodl-tmp/
```
拉取项目
Pull project
```
git clone https://gitclone.com/github.com/fishaudio/fish-speech.git ; cd fish-speech
```
安装依赖
Install dependencies
```
pip install -e.
```
如果报错,安装portaudio
If an error occurs, install portaudio
```
apt-get install portaudio19-dev -y
```
安装后执行
Execute after installation
```
pip install torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 --index-url https://download.pytorch.org/whl/cu121
```
下载模型
Download the model
```
cd tools
python download_models.py
python download_models.py
```
下载完模型后运行接口
Run the interface after downloading the model
```
python -m tools.api_server --listen 0.0.0.0:6006
python -m tools.api_server --listen 0.0.0.0:6006
```
然后用浏览器去到aotodl实例页面
Then use the browser to go to the aotodl instance page
```
https://autodl.com/console/instance/list
```
如下图点击你刚才机器的`自定义服务`按钮,开启端口转发服务
![自定义服务](images/fishspeech/autodl-01.png)
As shown below, click the 'Custom Service' button on your machine to start the port forwarding service.
![Custom Service](images/fishspeech/autodl-01.png)
端口转发服务设置完成后,你本地电脑打开网址`http://localhost:6006/`,就可以访问fish-speech的接口了
![服务预览](images/fishspeech/autodl-02.png)
After the port forwarding service is set up, you can access the fish-speech interface by opening the URL `http://localhost:6006/` on your local computer.
![Service Preview](images/fishspeech/autodl-02.png)
如果你是单模块部署,核心配置如下
If you are deploying a single module, the core configuration is as follows
```
selected_module:
TTS: FishSpeech
TTS:
FishSpeech:
reference_audio: ["config/assets/wakeup_words.wav",]
reference_text: ["哈啰啊,我是小智啦,声音好听的台湾女孩一枚,超开心认识你耶,最近在忙啥,别忘了给我来点有趣的料哦,我超爱听八卦的啦",]
reference_text: ["Hello, I'm Xiaozhi, a Taiwanese girl with a nice voice. I'm so happy to meet you. What are you busy with recently? Don't forget to give me some interesting information. I love to hear gossip."]
api_key: "123"
api_url: "http://127.0.0.1:6006/v1/tts"
```
然后重启服务
Then restart the service