Home Creators Posts Import Register Favorites Logout

Content

Video : https://youtu.be/ST6vKFDJ9NU

In this comprehensive tutorial, we dive deep into Fish Speech S2 Pro, the latest open-source, state-of-the-art text-to-speech AI model that is currently topping the Hugging Face charts. With over 5 billion parameters and training on more than 10 million hours of audio data across 80+ languages, this model offers unprecedented voice cloning capabilities and emotional range. We will walk you through the entire installation process, from setting up your Conda environment and managing GPU dependencies to running the official web UI for quick tests. Whether you are a developer, a content creator, or an AI enthusiast, understanding how to leverage this powerful tool locally is the key to unlocking professional-grade audio generation without recurring subscription costs.

This content is specifically designed for service providers, software developers, and digital creators who need high-quality, long-form audio generation solutions. Unlike standard demos that only handle short sentences, this video demonstrates a custom-modified version of the Fish Speech repository capable of processing thousands of words in a single session using a chunk-by-chunk inference method. We also integrate OpenAI’s Whisper Small model for accurate audio transcription, enabling seamless voice cloning workflows entirely on your local machine. If you are looking to build custom TTS applications, automate voiceovers for lengthy videos, or experiment with cutting-edge AI audio architecture, this step-by-step guide provides the exact code modifications and command-line arguments you need.

Mastering local AI deployment matters now more than ever as the landscape of generative audio shifts towards open-source solutions that offer greater control and privacy. By learning to run Fish Speech S2 Pro with BF16 precision and optimizing your VRAM usage, you gain the ability to produce consistent, emotionally nuanced voiceovers that rival commercial services. This video not only covers the technical setup but also showcases practical examples of using emotion tags and pitch variations to create dynamic character voices. Join us as we transform raw text into lifelike speech, empowering you to create scalable audio content with the most advanced free tools available today.

Fish-Speech Repo https://github.com/fishaudio/fish-speech

My modify Fish-Speech Repo https://github.com/benjiyaya/fish-speech

Setup Video : https://youtu.be/ST6vKFDJ9NU

Detail Setup Steps:

## Fish Speech S2 – Local Installation (Windows & Linux)

This guide walks you through installing and running the Fish Speech S2 WebUI *locally* on your own machine, using the S2‑Pro model.

By the end, you will have:

- All Python dependencies installed in a virtual environment

- The S2‑Pro model and decoder checkpoint downloaded locally

- The WebUI running in your browser (classic WebUI and/or WebUI v2)

This document covers *Windows 10/11 and Linux*. macOS users can generally follow the Linux steps but are not explicitly tested here.

---

### 1. Prerequisites

#### 1.1 Hardware

- *Recommended: NVIDIA GPU with 16 GB+ VRAM* for best performance with S2‑Pro

- *Minimum*: Modern CPU with AVX2 support  

  > You can run on *CPU only*, but generation will be significantly slower.

#### 1.2 Operating system

- *Windows*: Windows 10 / 11 (64‑bit)

- *Linux*: Recent 64‑bit distribution (e.g. Ubuntu 20.04+)

#### 1.3 Required software

- *Python 3.10+* (64‑bit)

- *Git*

- *FFmpeg* installed and available on your `PATH`

  - *Windows*:  

    - Download from `https://ffmpeg.org/` (or use `choco install ffmpeg` if you have Chocolatey)  

    - Add the `ffmpeg/bin` folder to your system `PATH`

  - *Linux* (Debian/Ubuntu):

    ```bash

    sudo apt update

    sudo apt install ffmpeg

    ```

- *Optional but strongly recommended*: CUDA‑enabled GPU stack

  - Latest NVIDIA GPU driver

  - CUDA‑enabled PyTorch build (see `https://pytorch.org/get-started/locally/`)

> If you already have PyTorch with CUDA installed, you can keep it and still use this guide. Install the WebUI extras on top.

---

### 2. Clone the repository

Open a terminal (PowerShell on Windows, any shell on Linux) and run:

```bash

git clone https://github.com/fishaudio/fish-speech.git

cd fish-speech

```

All paths in this document assume you are in the *repository root* directory.

---

### 3. Create and activate a virtual environment

Using a Python virtual environment is recommended to keep dependencies isolated.

#### Windows

```powershell

python -m venv .venv

.venv\Scripts\activate

```

You should see `(.venv)` in your prompt once the environment is active.

#### Linux

```bash

python -m venv .venv

source .venv/bin/activate

```

To deactivate later, run `deactivate` in the same terminal.

---

### 4. Install Python dependencies

Fish Speech has core dependencies (the TTS engine itself) plus *extra packages* used by the WebUI and Whisper integration.

The simplest way to get a working local WebUI environment is:

```bash

pip install -r requirements.txt

```

The `requirements.txt` in this repository includes (among others):

- `torch` (PyTorch)

- `gradio`

- `openai-whisper`

- `numpy`, `numba`, `tiktoken`, `soundfile`, `ffmpeg-python`, `loguru`

> If you prefer to install a specific GPU build of PyTorch (for CUDA), install PyTorch *first* following the official instructions at `https://pytorch.org/get-started/locally/`, and then run:

>

> ```bash

> pip install -r requirements.txt

> ```

>

> This will keep your existing PyTorch installation and add the missing packages.

---

### 5. Download model checkpoints

Fish Speech S2‑Pro consists of:

- A *LLaMA‑style checkpoint* (main TTS model)

- A *decoder / codec checkpoint* (`codec.pth`)

Both are required for local inference.

#### 5.1 Create checkpoint folders

From the repository root:

```bash

mkdir -p checkpoints/s2-pro

```

On Windows PowerShell:

```powershell

mkdir checkpoints\s2-pro

```

After this step you should have a folder:

- `checkpoints/s2-pro/`

#### 5.2 Download S2‑Pro model (Hugging Face)

1. Go to the S2‑Pro model page on Hugging Face:  

   `https://huggingface.co/fishaudio/s2-pro`

2. Download the model files using *Git LFS* or the web UI:

   - Install Git LFS if needed: `https://git-lfs.com/`

   - Example (from any folder outside the repo):

     ```bash

     git lfs install

     git clone https://huggingface.co/fishaudio/s2-pro

     ```

3. Copy or move the contents of the downloaded `s2-pro` folder into:

   - `checkpoints/s2-pro/`

At minimum, this folder must contain:

- The LLaMA checkpoint files used by Fish Speech S2‑Pro

- The codec checkpoint file, usually named `codec.pth`

Your layout should look like:

```text

fish-speech/

  checkpoints/

    s2-pro/

      codec.pth

      # other model files...

```

#### 5.3 Optional: Whisper model for auto‑transcription

Whisper is *only required if you want to use the “Auto-transcribe with Whisper”* button for reference audio. Basic text‑to‑speech will work without it.

Recommended default path:

- `checkpoints/whisper-small-pt`

You have two main options:

- Let `openai-whisper` *auto-download* the model the first time you request it (it will usually cache under your user directory); or

- Manually place a Whisper model (e.g. `small`) under a directory of your choice (e.g. `checkpoints/whisper-small-pt`).

If you choose a custom directory, you can point the WebUI to it via the `--whisper-model-dir` argument (see below).

---

### 6. Launching the classic WebUI (`tools/run_webui.py`)

The classic WebUI provides TTS with voice cloning and Whisper‑based reference transcription.

From the *repository root*, with your virtual environment activated:

```bash

python tools/run_webui.py ^

  --llama-checkpoint-path checkpoints/s2-pro ^

  --decoder-checkpoint-path checkpoints/s2-pro/codec.pth ^

  --whisper-model-dir checkpoints/whisper-small-pt

```

On Linux (or Windows using a bash shell), the same command is:

```bash

python tools/run_webui.py \

  --llama-checkpoint-path checkpoints/s2-pro \

  --decoder-checkpoint-path checkpoints/s2-pro/codec.pth \

  --whisper-model-dir checkpoints/whisper-small-pt

```

Key arguments:

- *`--llama-checkpoint-path`*  

  Directory containing the S2‑Pro LLaMA weights. Default: `checkpoints/s2-pro`

- *`--decoder-checkpoint-path`*  

  Path to the codec checkpoint, e.g. `checkpoints/s2-pro/codec.pth`

- *`--whisper-model-dir`* (optional)  

  Directory containing or caching the Whisper model used for reference‑audio transcription. Default: `checkpoints/whisper-small-pt`

Other useful flags:

- `--device cuda` – force CUDA if available

- `--half` – use FP16 precision (saves VRAM, may be slightly faster)

- `--compile` – enable `torch.compile` (experimental)

- `--theme light` / `--theme dark` – set UI theme

> The script will automatically detect *MPS (Apple Silicon), XPU, or CPU* and fall back accordingly if CUDA is not available.

Once the models are loaded and the WebUI starts, the terminal will print a URL such as:

- `http://127.0.0.1:7860`

Open this URL in your browser to use the WebUI.

---

### 7. Launching WebUI v2 (`tools/run_webui_v2.py`)

WebUI v2 provides a *richer interface with long‑form TTS support (e.g. 3,000–5,000 words) and uses the same checkpoints* as the classic WebUI.

From the repository root:

```bash

python tools/run_webui_v2.py ^

  --llama-checkpoint-path checkpoints/s2-pro ^

  --decoder-checkpoint-path checkpoints/s2-pro/codec.pth ^

  --whisper-model-dir checkpoints/whisper-small-pt

```

Linux / bash equivalent:

```bash

python tools/run_webui_v2.py \

  --llama-checkpoint-path checkpoints/s2-pro \

  --decoder-checkpoint-path checkpoints/s2-pro/codec.pth \

  --whisper-model-dir checkpoints/whisper-small-pt

```

Flags behave similarly to the classic WebUI script:

- `--device`, `--half`, `--compile`, `--theme`, and `--whisper-model-dir` are all supported.

After startup, open the URL printed in the terminal (e.g. `http://127.0.0.1:7860`) in your browser.

---

### 8. Basic usage tips

- *Text‑to‑speech*  

  - Enter text into the main textbox and click *Generate / Generate speech* to synthesize audio.  

  - You can add emotion tags such as `[laugh]`, `[whisper]`, `[excited]`, `[sad]`, etc. inline in your text.

- *Voice cloning (Reference Audio)*  

  - Open the *Reference Audio* section/tab.  

  - Upload a short reference clip (*5–10 seconds* is usually enough).  

  - Provide a matching *Reference Text* (exact or close transcription).  

  - Generate speech to clone the reference voice.

- *Auto‑transcribe with Whisper*  

  - After uploading a reference audio file, click *“Auto-transcribe with Whisper”* to fill the Reference Text automatically.  

  - Requires FFmpeg, `openai-whisper`, and a valid `--whisper-model-dir` (or default location).

---

### 9. Troubleshooting

- *Very slow generation / CPU only*  

  - Check that your NVIDIA drivers and CUDA toolkit are correctly installed.  

  - Install a CUDA‑enabled PyTorch build (see `https://pytorch.org/get-started/locally/`).  

  - Use `--device cuda` to force GPU if PyTorch detects it.

- *“File not found” for checkpoints*  

  - Double‑check that:

    - `--llama-checkpoint-path` points to the *directory* containing the S2‑Pro model files, e.g. `checkpoints/s2-pro`  

    - `--decoder-checkpoint-path` points to the *codec file*, e.g. `checkpoints/s2-pro/codec.pth`  

  - Ensure the paths are correct for your OS (backslashes vs forward slashes on Windows).

- *FFmpeg not found*  

  - Ensure `ffmpeg` is installed and available on your `PATH`.  

  - On Windows, open a new terminal after updating the `PATH`.  

  - On Linux, verify with:

    ```bash

    ffmpeg -version

    ```

- *Out‑of‑memory errors (CUDA OOM)*  

  - Try enabling `--half` to reduce VRAM usage.  

  - Reduce text length or use WebUI v2 long‑form mode with smaller chunks.

---

### 10. Next steps & advanced docs

For more advanced usage, deployment options, and detailed explanations, see:

- *Official Installation guide* (uv, Docker, advanced setups):  

  `https://speech.fish.audio/install/`

- *Inference guide* (CLI, WebUI, server):  

  `https://speech.fish.audio/inference/`

- *Server / production deployment*:  

  `https://speech.fish.audio/server/`

If you run into issues not covered here, please refer to the main `README.md` in this repository and the official documentation above.

Files

Fish Speech S2 Pro - SOTA TTS: I Modded It to Run Long-Form Audio Locally

In this comprehensive tutorial, we dive deep into FishSpeech S2 Pro, the latest open-source, state-of-the-art text-to-speech AI model that is currently topping the Hugging Face charts. With over 5 billion parameters and training on more than 10 million hours of audio data across 80+ languages, this model offers unprecedented voice cloning capabilities and emotional range. We will walk you through the entire installation process, from setting up your Conda environment and managing GPU dependencies to running the official web UI for quick tests. Whether you are a developer, a content creator, or an AI enthusiast, understanding how to leverage this powerful tool locally is the key to unlocking professional-grade audio generation without recurring subscription costs. This content is specifically designed for service providers, software developers, and digital creators who need high-quality, long-form audio generation solutions. Unlike standard demos that only handle short sentences, this video demonstrates a custom-modified version of the FishSpeech repository capable of processing thousands of words in a single session using a chunk-by-chunk inference method. We also integrate OpenAI’s Whisper Small model for accurate audio transcription, enabling seamless voice cloning workflows entirely on your local machine. If you are looking to build custom TTS applications, automate voiceovers for lengthy videos, or experiment with cutting-edge AI audio architecture, this step-by-step guide provides the exact code modifications and command-line arguments you need. Mastering local AI deployment matters now more than ever as the landscape of generative audio shifts towards open-source solutions that offer greater control and privacy. By learning to run FishSpeech S2 Pro with BF16 precision and optimizing your VRAM usage, you gain the ability to produce consistent, emotionally nuanced voiceovers that rival commercial services. This video not only covers the technical setup but also showcases practical examples of using emotion tags and pitch variations to create dynamic character voices. Join us as we transform raw text into lifelike speech, empowering you to create scalable audio content with the most advanced free tools available today. Detail Setup Steps In Text: https://www.patreon.com/posts/153257539?utm_source=yt&utm_medium=video&utm_campaign=20260317 Fish-Speech Repo https://github.com/fishaudio/fish-speech My modify Fish-Speech Repo https://github.com/benjiyaya/fish-speech -------------------------------------------------------------------------------------------------------------------------------- Local Workstation GPU : https://amzn.to/3XfXsAO -------------------------------------------------------------------------------------------------------------------------------- If You Like tutorial like this, You Can Support Our Work In Patreon: https://www.patreon.com/c/aifuturetech

Comments

No comments found for this post.