MIT License

项目介绍

EvilFreelancer/docker-fish-speech-server 是一个托管在 GitHub 上的开源项目,主要使用 Python 编写,采用 MIT License 许可证,目前获得 33 个 Star、4 次 Fork。

仓库全名
EvilFreelancer/docker-fish-speech-server
开源许可证
MIT License
Star 数
33
Fork 数
4
未关闭 Issue
2

README 摘要

Fish Speech API Webserver in Docker OpenAPI-like voice generation server based on fish-speech-1.5. Supports text-to-speech and voice style transfer via reference audio samples. Requirements Nvidia GPU For Docker-way Nvidia Docker Runtime Docker Docker Compose For Manual Setup Python 3.12 Python Venv 🔧 Quick Start Clone the repo first: Docker-way Enter the container: Download the model: Manual Setup Set up a virtual…

完整内容见 GitHub 原始 README 或本页 。

常见问题

docker-fish-speech-server 用什么语言开发?

主要使用 Python 编写,采用 MIT License 许可证,目前有 33 个 Star。

docker-fish-speech-server 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 docker-fish-speech-server 的源码?

可以直接克隆仓库:git clone https://github.com/EvilFreelancer/docker-fish-speech-server.git,默认分支为 main;安装与运行步骤见仓库 README。

docker-fish-speech-server 最近还在维护吗?

仓库最近一次更新为 2025年5月25日,当前有 2 个未关闭 Issue;Star 数为 33,可作为社区活跃度的参考。

关于

OpenAPI-like API-server for voice generation (TTS) based on fish-speech-1.5 model.

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

简要分析

热度分
43
价值分
21
活跃状态
活跃

语言占比

Dockerfile
Python
Shell

README

Fish Speech API Webserver in Docker

OpenAPI-like voice generation server based on fish-speech-1.5.

Supports text-to-speech and voice style transfer via reference audio samples.

Requirements

  • Nvidia GPU
  • For Docker-way
    • Nvidia Docker Runtime
    • Docker
    • Docker Compose
  • For Manual Setup
    • Python 3.12
    • Python Venv

🔧 Quick Start

Clone the repo first:

git clone --recurse-submodules [email protected]:EvilFreelancer/fish-speech-api.git
cd docker-fish-speech-server

Docker-way

cp docker-compose.dist.yml docker-compose.yml
docker compose up -d

Enter the container:

docker compose exec api bash

Download the model:

huggingface-cli download fishaudio/fish-speech-1.5 --local-dir models/fish-speech-1.5/

Manual Setup

apt install cmake portaudio19-dev

Set up a virtual environment and install dependencies:

python3.12 -m venv venv
pip install -r requirements.txt

Download model:

huggingface-cli download fishaudio/fish-speech-1.5 --local-dir models/fish-speech-1.5/

Run API-server:

python main.py

🧪 Testing the API

Generate speech with default voice

curl http://localhost:8000/audio/speech \
  -X POST \
  -F model="fish-speech-1.5" \
  -F input="Hello, this is a test of Fish Speech API" \
  --output "speech.wav"

In JSON format:

curl http://localhost:8000/audio/speech \
  -H "Content-Type: application/json" \
  -d '{
      "model": "fish-speech-1.5",
      "input": "Hello, this is a test of Fish Speech API"
  }' \
  --output "speech.wav"

Generate speech with example voice

curl http://gpu02:13000/audio/speech \
  -X POST \
  -F model="fish-speech-1.5" \
  -F voice="english-nice" \
  -F input="Dr. Eleanor Whitaker, a quantum physicist from Edinburgh, surreptitiously analyzed the enigmatic hieroglyphs while humming Für Elise —her quizzical expression mirrored the cryptic symbols perplexing arrangement, yet she remained determined to decipher their archaic secrets." \
  --output "speech.wav"

In JSON format:

curl http://localhost:8000/audio/speech \
  -H "Content-Type: application/json" \
  -d '{
      "model": "fish-speech-1.5",
      "voice": "english-nice",
      "input": "Dr. Eleanor Whitaker, a quantum physicist from Edinburgh, surreptitiously analyzed the enigmatic hieroglyphs while humming Für Elise —her quizzical expression mirrored the cryptic symbols perplexing arrangement, yet she remained determined to decipher their archaic secrets."
  }' \
  --output "speech.wav"

Generate speech with reference voice

curl http://localhost:8000/audio/speech \
  -X POST \
  -H 'Content-Type: multipart/form-data' \
  -F model="fish-speech-1.5" \
  -F input="Dr. Eleanor Whitaker, a quantum physicist from Edinburgh, surreptitiously analyzed the enigmatic hieroglyphs while humming Für Elise —her quizzical expression mirrored the cryptic symbols perplexing arrangement, yet she remained determined to decipher their archaic secrets." \
  -F reference_audio="@voice-viola.wav" \
  --output "speech.wav"

In JSON format:

curl http://localhost:8000/audio/speech \
  -H "Content-Type: application/json" \
  -d '{
      "model": "fish-speech-1.5",
      "input": "Dr. Eleanor Whitaker, a quantum physicist from Edinburgh, surreptitiously analyzed the enigmatic hieroglyphs while humming Für Elise —her quizzical expression mirrored the cryptic symbols perplexing arrangement, yet she remained determined to decipher their archaic secrets.",
      "reference_audio": "=base64..."
  }' \
  --output "speech.wav"
Advanced settings
curl http://localhost:8000/audio/speech \
  -X POST \
  -H 'Content-Type: multipart/form-data' \
  -F model="fish-speech-1.5" \
  -F input="Dr. Eleanor Whitaker, a quantum physicist from Edinburgh, surreptitiously analyzed the enigmatic hieroglyphs while humming Für Elise —her quizzical expression mirrored the cryptic symbols perplexing arrangement, yet she remained determined to decipher their archaic secrets." \
  -F top_p="0.1" \
  -F repetition_penalty="1.3" \
  -F temperature="0.75" \
  -F chunk_length="150" \
  -F max_new_tokens="768" \
  -F seed="42" \
  -F reference_audio="@voice-viola.wav" \
  --output "speech.wav"

In JSON format:

curl http://localhost:8000/audio/speech \
  -H "Content-Type: application/json" \
  -d '{
      "model": "fish-speech-1.5",
      "input": "Dr. Eleanor Whitaker, a quantum physicist from Edinburgh, surreptitiously analyzed the enigmatic hieroglyphs while humming Für Elise —her quizzical expression mirrored the cryptic symbols perplexing arrangement, yet she remained determined to decipher their archaic secrets.",
      "top_p": "0.1",
      "repetition_penalty": "1.3",
      "temperature": "0.75",
      "chunk_length": "150",
      "max_new_tokens": "768",
      "seed": "42",
      "reference_audio": "=base64..."
  }' \
  --output "speech.wav"

评论

暂无评论