A Fish Speech server of your own

English · 简体中文

fish-speech is the open side of Fish Audio: its S2 Pro model, running on your own machine, speaking in any voice you give it a short recording of. The plugin's Fish Speech section is for it, and lists every voice on it in the player under a Fish Speech entry of the first dropdown, by its name. Sentences are highlighted, not words: the server reports no word timings.

What it needs

Run it with Docker

git clone https://github.com/fishaudio/fish-speech.git
cd fish-speech
pip install -U huggingface_hub
hf download fishaudio/s2-pro --local-dir checkpoints/s2-pro
COMPILE=1 docker compose --profile server up

Give it a voice

The server offers the voices in its references/ folder: one folder per voice, named as the voice will be, holding a recording of 10–30 seconds of clean speech and, beside it, a text file with the same name and the .lab extension that holds exactly what is said in the recording. The server adds one for you from a WAV file, into that folder:

curl -X POST http://localhost:8080/v1/references/add \
  -F id=myvoice -F audio=@sample.wav -F text="the words spoken in sample.wav"

The name — myvoice here — is what the player shows; letters, digits, spaces, - and _ only.

In Zotero

  1. Edit → Settings → OpenReader → Fish Speech: Address is http://localhost:8080 for a server on this machine; on another machine of your LAN, its name or IP address in place of localhost.
  2. A server started with --api-key: put Authorization: Bearer <the key> into Extra headers.
  3. Test connection → Connected. N voices available. → Enable.
  4. In the player, the voices are the folder names under Fish Speech, filed under Multiple languages: the server does not say which language a voice speaks, and the model speaks 80 languages.

Good to know