2026 Voice Cloning Solution Comparison: Deploying & Testing IndexTTS-2, CosyVoice, GPT-SoVITS, Fish Speech, and VoxCPM
# A hands-on comparison of five open-source voice cloning solutions — IndexTTS-2, CosyVoice, GPT-SoVITS, Fish Speech, and VoxCPM — covering deployment steps, troubleshooting, inference speed, audio samples, and selection advice.
With rapid advances in large language models and speech synthesis, voice cloning has become one of the most active areas in text-to-speech (TTS).
Whether for digital humans, AI dubbing, voice assistants, content creation, or personalized interaction, more teams are evaluating how open-source voice cloning solutions hold up in real-world production workflows.
Once you actually start deploying and testing them, however, the real questions go far beyond “does it produce audio?” What matters is: which solution is easiest to deploy, which one handles mixed-language input reliably, and which one achieves higher speaker similarity?
This article compares five mainstream open-source voice cloning solutions — IndexTTS-2, CosyVoice, GPT-SoVITS, Fish Speech, and VoxCPM — based on hands-on deployment and testing. It examines their setup complexity, zero-shot quality, Chinese-English code-switching performance, API serving support, and fine-tuning potential to help you quickly narrow down the best fit for your use case.
Updated June 12, 2026: Added VoxCPM.
Deployment & Testing
All tests below were conducted on AutoDL.
Test machine specifications:
GPU: 1x RTX 4090 (24GB)
CPU: 16 vCPU Intel(R) Xeon(R) Platinum 8352V CPU @ 2.10GHz
RAM: 120GB
Disk: System disk: 30GB
Data disk: Free 50GB SSD / Paid 0GB
Cost-saving tip:
AutoDL supports both normal GPU boot and GPU-less (“no-GPU”) boot modes. GPU-less mode costs only ¥0.1/hour (~$0.014/hour), so use it while installing dependencies and downloading weights, then switch back to normal GPU mode for actual inference tests.
Learned the hard way: I kept normal GPU mode running while setting up IndexTTS and burned through several dozen RMB in half a day. 😭😭😭
The reference audio is a short clip of my child reading aloud (in Chinese), and the target text for synthesis is the bilingual Chinese-English sentence: "Welcome to Beijing, President Trump.北京欢迎你,特朗普总统". (The audio samples below retain this original bilingual test clip.)
IndexTTS-2
Repository: https://github.com/index-tts/index-tts
IndexTTS-2 is a breakthrough autoregressive zero-shot text-to-speech model designed for precise duration control, which is crucial for applications such as video dubbing. It decouples emotional expression from speaker identity, allowing independent control over timbre and emotion. The model incorporates GPT latent representations and a soft-instruction mechanism based on text descriptions for enhanced emotional control.
Deployment & Verification
- Clone the repository
git lfs install
git clone https://github.com/index-tts/index-tts.git
cd index-tts
git lfs pull
- Install dependencies
curl -LsSf https://astral.sh/uv/install.sh | sh
source ~/.bashrc
uv sync --all-extras
# Optional PyPI mirror for users in China:
# uv sync --all-extras --default-index "https://mirrors.aliyun.com/pypi/simple"
- Download model weights
Option 1: Hugging Face
# Optional Hugging Face mirror for users in China:
# export HF_ENDPOINT="https://hf-mirror.com"
uv tool install "huggingface-hub[cli,hf_xet]"
hf download IndexTeam/IndexTTS-2 --local-dir=checkpoints
Option 2: ModelScope
uv tool install "modelscope"
modelscope download --model IndexTeam/IndexTTS-2 --local_dir checkpoints
- Check the GPU environment
uv run tools/gpu_check.py
Scanning for PyTorch hardware acceleration devices...
...
Hardware acceleration detected. Your system is ready!
Seeing this output means the environment is ready for synthesis testing.
- Run a synthesis test
Edit the repository’s default indextts/infer_v2.py:
- Change line 834 (
prompt_wav = "examples/voice_01.wav") to point to your reference audio file. - Change line 835 (
text = '欢迎大家来体验indextts2,并给予我们意见与反馈,谢谢大家。') to your target text. - Delete everything below line 842 (
tts.infer(spk_audio_prompt=prompt_wav, text=text, output_path="gen.wav", verbose=True)).
Run the inference script:
PYTHONPATH="$PYTHONPATH:." uv run indextts/infer_v2.py
Synthesis took 2+ minutes. Here is the generated audio:
When I sent this generated clip to my wife, she didn’t realize it was AI-generated on first listen. For zero-shot voice cloning, that is an impressive result.
Troubleshooting
- Git LFS pull failed with the following error:
git lfs pull
Error updating the Git index: (0/1), 0 B | 0 B/s
error: indextts/BigVGAN/__init__.py: cannot add to the index - missing --add option?
fatal: Unable to process path indextts/BigVGAN/__init__.py
Errors logged to '/root/index-tts/.git/lfs/logs/20260513T105919.131495169.log'.
Use git lfs logs last to view the log.
batch response: This repository exceeded its LFS budget. The account responsible for the budget should increase it to restore access.
Failed to fetch some objects from 'https://github.com/index-tts/index-tts.git/info/lfs'
Replace Step 1 with the following commands to skip LFS smudge during clone:
rm -rf index-tts
GIT_LFS_SKIP_SMUDGE=1 git clone https://github.com/index-tts/index-tts.git
cd index-tts
- Synthesis test errors
OSError: We couldn't connect to 'https://hf-mirror.com' to load the files, and couldn't find them in the cached files.
Full traceback:
PYTHONPATH="$PYTHONPATH:." uv run indextts/infer_v2.py
>> GPT weights restored from: checkpoints/gpt.pth
GPT2InferenceModel has generative capabilities, as `prepare_inputs_for_generation` is explicitly overwritten. However, it doesn't directly inherit from `GenerationMixin`. From 👉v4.50👈 onwards, `PreTrainedModel` will NOT inherit from `GenerationMixin`, and this model will lose the ability to call `generate` and other related functions.
- If you're using `trust_remote_code=True`, you can get rid of this warning by loading the model with an auto class. See https://huggingface.co/docs/transformers/en/model_doc/auto#auto-classes
- If you are the owner of the model architecture code, please modify your model class such that it inherits from `GenerationMixin` (after `PreTrainedModel`, otherwise you'll get an exception).
- If you are not the owner of the model architecture class, please contact the model code owner to update it.
Traceback (most recent call last):
File "/Users/liudon/index-tts/.venv/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1568, in _get_metadata_or_catch_error
raise FileMetadataError(
huggingface_hub.errors.FileMetadataError: Distant resource does not seem to be on huggingface.co. It is possible that a configuration issue prevents you from downloading resources from https://huggingface.co. Please check your firewall and proxy settings and make sure your SSL certificates are updated.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/liudon/index-tts/.venv/lib/python3.10/site-packages/transformers/utils/hub.py", line 470, in cached_files
hf_hub_download(
File "/Users/liudon/index-tts/.venv/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
File "/Users/liudon/index-tts/.venv/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1010, in hf_hub_download
return _hf_hub_download_to_cache_dir(
File "/Users/liudon/index-tts/.venv/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1117, in _hf_hub_download_to_cache_dir
_raise_on_head_call_error(head_call_error, force_download, local_files_only)
File "/Users/liudon/index-tts/.venv/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1661, in _raise_on_head_call_error
raise LocalEntryNotFoundError(
huggingface_hub.errors.LocalEntryNotFoundError: An error happened while trying to locate the file on the Hub and we cannot find the requested files in the local cache. Please check your connection and try again or make sure your Internet connection is on.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/liudon/index-tts/indextts/infer_v2.py", line 836, in <module>
tts = IndexTTS2(
File "/Users/liudon/index-tts/indextts/infer_v2.py", line 115, in __init__
self.extract_features = SeamlessM4TFeatureExtractor.from_pretrained("facebook/w2v-bert-2.0")
File "/Users/liudon/index-tts/.venv/lib/python3.10/site-packages/transformers/feature_extraction_utils.py", line 384, in from_pretrained
feature_extractor_dict, kwargs = cls.get_feature_extractor_dict(pretrained_model_name_or_path, **kwargs)
File "/Users/liudon/index-tts/.venv/lib/python3.10/site-packages/transformers/feature_extraction_utils.py", line 510, in get_feature_extractor_dict
resolved_feature_extractor_file = cached_file(
File "/Users/liudon/index-tts/.venv/lib/python3.10/site-packages/transformers/utils/hub.py", line 312, in cached_file
file = cached_files(path_or_repo_id=path_or_repo_id, filenames=[filename], **kwargs)
File "/Users/liudon/index-tts/.venv/lib/python3.10/site-packages/transformers/utils/hub.py", line 543, in cached_files
raise OSError(
OSError: We couldn't connect to 'https://hf-mirror.com' to load the files, and couldn't find them in the cached files.
Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'.
This was caused by the export HF_ENDPOINT="https://hf-mirror.com" environment variable set earlier. Unset it to resolve the issue:
unset HF_ENDPOINT
Rerunning the script will download the remaining auxiliary models directly from Hugging Face (which took roughly an hour in mainland China due to network latency).
OSError: Can't load the model for 'facebook/w2v-bert-2.0'. If you were trying to load it from 'https://huggingface.co/models', make sure you don't have a local directory with the same name. Otherwise, make sure 'facebook/w2v-bert-2.0' is the correct path to a directory containing a file named pytorch_model.bin, tf_model.h5, model.ckpt or flax_model.msgpack.
Full traceback:
PYTHONPATH="$PYTHONPATH:." uv run indextts/infer_v2.py
>> GPT weights restored from: checkpoints/gpt.pth
GPT2InferenceModel has generative capabilities, as `prepare_inputs_for_generation` is explicitly overwritten. However, it doesn't directly inherit from `GenerationMixin`. From 👉v4.50👈 onwards, `PreTrainedModel` will NOT inherit from `GenerationMixin`, and this model will lose the ability to call `generate` and other related functions.
- If you're using `trust_remote_code=True`, you can get rid of this warning by loading the model with an auto class. See https://huggingface.co/docs/transformers/en/model_doc/auto#auto-classes
- If you are the owner of the model architecture code, please modify your model class such that it inherits from `GenerationMixin` (after `PreTrainedModel`, otherwise you'll get an exception).
- If you are not the owner of the model architecture class, please contact the model code owner to update it.
Traceback (most recent call last):
File "/Users/liudon/index-tts/indextts/infer_v2.py", line 836, in <module>
tts = IndexTTS2(
File "/Users/liudon/index-tts/indextts/infer_v2.py", line 116, in __init__
self.semantic_model, self.semantic_mean, self.semantic_std = build_semantic_model(
File "/Users/liudon/index-tts/indextts/utils/maskgct_utils.py", line 88, in build_semantic_model
semantic_model = Wav2Vec2BertModel.from_pretrained("facebook/w2v-bert-2.0")
File "/Users/liudon/index-tts/.venv/lib/python3.10/site-packages/transformers/modeling_utils.py", line 308, in _wrapper
return func(*args, **kwargs)
File "/Users/liudon/index-tts/.venv/lib/python3.10/site-packages/transformers/modeling_utils.py", line 4461, in from_pretrained
checkpoint_files, sharded_metadata = _get_resolved_checkpoint_files(
File "/Users/liudon/index-tts/.venv/lib/python3.10/site-packages/transformers/modeling_utils.py", line 1125, in _get_resolved_checkpoint_files
raise EnvironmentError(
OSError: facebook/w2v-bert-2.0 does not appear to have a file named pytorch_model.bin, model.safetensors, tf_model.h5, model.ckpt or flax_model.msgpack.
This was also network-related. Download the auxiliary models manually with hf download:
hf download facebook/w2v-bert-2.0
hf download amphion/MaskGCT semantic_codec/model.safetensors
hf download funasr/campplus
hf download nvidia/bigvgan_v2_22khz_80band_256x bigvgan_generator.pt config.json
hf download Plachta/JDCnet bst.t7
CosyVoice
Repository: https://github.com/FunAudioLLM/CosyVoice
CosyVoice 3.0 is an advanced large language model (LLM)-based text-to-speech (TTS) system that improves upon its predecessor (CosyVoice 2.0) in content consistency, speaker similarity, and prosodic naturalness. It is built for real-world zero-shot multilingual speech synthesis.
For this test, I used the CosyVoice3-0.5B model.
Deployment & Verification
- Clone the repository
git clone --recursive https://github.com/FunAudioLLM/CosyVoice.git
# If cloning submodules fails due to network issues, keep re-running until it succeeds:
cd CosyVoice
git submodule update --init --recursive
- Create a Conda environment
conda create -n cosyvoice -y python=3.10
conda activate cosyvoice
pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/ --trusted-host=mirrors.aliyun.com
- Download model weights
Run the following Python snippet:
from modelscope import snapshot_download
snapshot_download('FunAudioLLM/Fun-CosyVoice3-0.5B-2512', local_dir='pretrained_models/Fun-CosyVoice3-0.5B')
snapshot_download('iic/CosyVoice-ttsfrd', local_dir='pretrained_models/CosyVoice-ttsfrd')
- Run a synthesis test
Create demo_example.py with the following contents:
import sys
sys.path.append('third_party/Matcha-TTS')
from cosyvoice.cli.cosyvoice import AutoModel
import torchaudio
def main():
""" CosyVoice3 Usage, check https://funaudiollm.github.io/cosyvoice3/ for more details
"""
cosyvoice = AutoModel(model_dir='pretrained_models/Fun-CosyVoice3-0.5B')
text = 'You are a helpful assistant.<|endofprompt|>Welcome to Beijing, President Trump. 北京欢迎你,特朗普总统。'
for i, j in enumerate(cosyvoice.inference_cross_lingual(text, './child.wav', stream=False, speed=1.2)):
torchaudio.save(f'cross_lingual_{i}.wav', j['tts_speech'], cosyvoice.sample_rate)
if __name__ == '__main__':
main()
Execute the test script:
python demo_example.py
Synthesis took 24 seconds. Here is the generated audio:
Troubleshooting
openai-whisperinstallation fails withNo module named 'pkg_resources'
Reference: https://github.com/FunAudioLLM/CosyVoice/issues/1844
Create a build-constraints.txt file with:
setuptools>=45,<80
Then install dependencies using the build constraint:
pip install --build-constraint build-constraints.txt -r requirements.txt
GPT-SoVITS
Repository: https://github.com/RVC-Boss/GPT-SoVITS
A powerful few-shot voice conversion and text-to-speech WebUI.
Deployment & Verification
- Clone the repository
git clone https://github.com/RVC-Boss/GPT-SoVITS.git
cd GPT-SoVITS
- Create a Conda environment
conda create -n GPTSoVits python=3.10
conda activate GPTSoVits
- Install dependencies and download models
bash install.sh --device CU128 --source HF-Mirror
- Start the API server
python api_v2.py -a 127.0.0.1 -p 9880 -c GPT_SoVITS/configs/tts_infer.yaml
- Run a synthesis test
curl "http://127.0.0.1:9880/tts?text=你好,欢迎测试音色克隆&text_lang=zh&ref_audio_path=ref.wav&prompt_lang=zh&prompt_text=这是一段参考音频"
Parameters:
text: Target text to synthesizetext_lang: Language of the target textref_audio_path: Path to the reference audio fileprompt_lang: Language of the reference audioprompt_text: Transcript of the reference audio — must match what is actually spoken, otherwise synthesis output will be inaccurate
Synthesis completed in under 10 seconds. Here is the generated audio:
Troubleshooting
Reference audio is outside the 3-10 second range, please choose another one!
GPT-SoVITS requires reference clips to be between 3 and 10 seconds long. Trim the audio with ffmpeg:
ffmpeg -i child.wav -t 10 -ar 32000 -ac 1 child_10s.wav
Exception: "Could not load libtorchcodec."
Full error response:
{"message":"tts failed","Exception":"Could not load libtorchcodec. Likely causes:\n 1. FFmpeg is not properly installed in your environment. We support\n versions 4, 5, 6, 7, and 8, and we attempt to load libtorchcodec\n for each of those versions. Errors for versions not installed on\n your system are expected; only the error for your installed FFmpeg\n version is relevant. On Windows, ensure you've installed the\n \"full-shared\" version which ships DLLs.\n 2. The PyTorch version (2.11.0+cu128) is not compatible with\n this version of TorchCodec. Refer to the version compatibility\n table:\n https://github.com/pytorch/torchcodec?tab=readme-ov-file#installing-torchcodec.\n 3. Another runtime dependency; see exceptions below.\n\n The following exceptions were raised as we tried to load libtorchcodec:\n \n[start of libtorchcodec loading traceback]\nFFmpeg version 8:\nTraceback (most recent call last):\n File \"/root/miniconda3/envs/GPTSoVits/lib/python3.10/site-packages/torch/_ops.py\", line 1503, in load_library\n ctypes.CDLL(path)\n File \"/root/miniconda3/envs/GPTSoVits/lib/python3.10/ctypes/__init__.py\", line 374, in __init__\n self._handle = _dlopen(self._name, mode)\nOSError: libnppicc.so.12: cannot open shared object file: No such file or directory\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n File \"/root/miniconda3/envs/GPTSoVits/lib/python3.10/site-packages/torchcodec/_internally_replaced_utils.py\", line 93, in load_torchcodec_shared_libraries\n torch.ops.load_library(core_library_path)\n File \"/root/miniconda3/envs/GPTSoVits/lib/python3.10/site-packages/torch/_ops.py\", line 1505, in load_library\n raise OSError(f\"Could not load this library: {path}\") from e\nOSError: Could not load this library: /root/miniconda3/envs/GPTSoVits/lib/python3.10/site-packages/torchcodec/libtorchcodec_core8.so\n\nFFmpeg version 7:\nTraceback (most recent call last):\n File \"/root/miniconda3/envs/GPTSoVits/lib/python3.10/site-packages/torch/_ops.py\", line 1503, in load_library\n ctypes.CDLL(path)\n File \"/root/miniconda3/envs/GPTSoVits/lib/python3.10/ctypes/__init__.py\", line 374, in __init__\n self._handle = _dlopen(self._name, mode)\nOSError: libnppicc.so.12: cannot open shared object file: No such file or directory\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n File \"/root/miniconda3/envs/GPTSoVits/lib/python3.10/site-packages/torchcodec/_internally_replaced_utils.py\", line 93, in load_torchcodec_shared_libraries\n torch.ops.load_library(core_library_path)\n File \"/root/miniconda3/envs/GPTSoVits/lib/python3.10/site-packages/torch/_ops.py\", line 1505, in load_library\n raise OSError(f\"Could not load this library: {path}\") from e\nOSError: Could not load this library: /root/miniconda3/envs/GPTSoVits/lib/python3.10/site-packages/torchcodec/libtorchcodec_core7.so\n\nFFmpeg version 6:\nTraceback (most recent call last):\n File \"/root/miniconda3/envs/GPTSoVits/lib/python3.10/site-packages/torch/_ops.py\", line 1503, in load_library\n ctypes.CDLL(path)\n File \"/root/miniconda3/envs/GPTSoVits/lib/python3.10/ctypes/__init__.py\", line 374, in __init__\n self._handle = _dlopen(self._name, mode)\nOSError: libnppicc.so.12: cannot open shared object file: No such file or directory\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n File \"/root/miniconda3/envs/GPTSoVits/lib/python3.10/site-packages/torchcodec/_internally_replaced_utils.py\", line 93, in load_torchcodec_shared_libraries\n torch.ops.load_library(core_library_path)\n File \"/root/miniconda3/envs/GPTSoVits/lib/python3.10/site-packages/torch/_ops.py\", line 1505, in load_library\n raise OSError(f\"Could not load this library: {path}\") from e\nOSError: Could not load this library: /root/miniconda3/envs/GPTSoVits/lib/python3.10/site-packages/torchcodec/libtorchcodec_core6.so\n\nFFmpeg version 5:\nTraceback (most recent call last):\n File \"/root/miniconda3/envs/GPTSoVits/lib/python3.10/site-packages/torch/_ops.py\", line 1503, in load_library\n ctypes.CDLL(path)\n File \"/root/miniconda3/envs/GPTSoVits/lib/python3.10/ctypes/__init__.py\", line 374, in __init__\n self._handle = _dlopen(self._name, mode)\nOSError: libnppicc.so.12: cannot open shared object file: No such file or directory\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n File \"/root/miniconda3/envs/GPTSoVits/lib/python3.10/site-packages/torchcodec/_internally_replaced_utils.py\", line 93, in load_torchcodec_shared_libraries\n torch.ops.load_library(core_library_path)\n File \"/root/miniconda3/envs/GPTSoVits/lib/python3.10/site-packages/torch/_ops.py\", line 1505, in load_library\n raise OSError(f\"Could not load this library: {path}\") from e\nOSError: Could not load this library: /root/miniconda3/envs/GPTSoVits/lib/python3.10/site-packages/torchcodec/libtorchcodec_core5.so\n\nFFmpeg version 4:\nTraceback (most recent call last):\n File \"/root/miniconda3/envs/GPTSoVits/lib/python3.10/site-packages/torch/_ops.py\", line 1503, in load_library\n ctypes.CDLL(path)\n File \"/root/miniconda3/envs/GPTSoVits/lib/python3.10/ctypes/__init__.py\", line 374, in __init__\n self._handle = _dlopen(self._name, mode)\nOSError: libnppicc.so.12: cannot open shared object file: No such file or directory\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n File \"/root/miniconda3/envs/GPTSoVits/lib/python3.10/site-packages/torchcodec/_internally_replaced_utils.py\", line 93, in load_torchcodec_shared_libraries\n torch.ops.load_library(core_library_path)\n File \"/root/miniconda3/envs/GPTSoVits/lib/python3.10/site-packages/torch/_ops.py\", line 1505, in load_library\n raise OSError(f\"Could not load this library: {path}\") from e\nOSError: Could not load this library: /root/miniconda3/envs/GPTSoVits/lib/python3.10/site-packages/torchcodec/libtorchcodec_core4.so\n[end of libtorchcodec loading traceback]."}
- Fix the
torchcodecbuild mismatch (switch from the+cu128wheel to the+cpuwheel):
(GPTSoVits) root@autodl-container-1421458302-fdce35d0:~/autodl-tmp/GPT-SoVITS# python -m pip show torchcodec
Name: torchcodec
Version: 0.11.1+cu128
Summary: A video decoder for PyTorch
Home-page:
Author:
Author-email: PyTorch Team <packages@pytorch.org>
License: BSD 3-Clause License
Copyright 2024 Meta
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,this list
of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may
be used to endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
Location: /root/miniconda3/envs/GPTSoVits/lib/python3.10/site-packages
Requires:
Required-by:
(GPTSoVits) root@autodl-container-1421458302-fdce35d0:~/autodl-tmp/GPT-SoVITS#
(GPTSoVits) root@autodl-container-1421458302-fdce35d0:~/autodl-tmp/GPT-SoVITS#
(GPTSoVits) root@autodl-container-1421458302-fdce35d0:~/autodl-tmp/GPT-SoVITS# python -m pip uninstall -y torchcodec
Found existing installation: torchcodec 0.11.1+cu128
Uninstalling torchcodec-0.11.1+cu128:
Successfully uninstalled torchcodec-0.11.1+cu128
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
(GPTSoVits) root@autodl-container-1421458302-fdce35d0:~/autodl-tmp/GPT-SoVITS#
(GPTSoVits) root@autodl-container-1421458302-fdce35d0:~/autodl-tmp/GPT-SoVITS#
(GPTSoVits) root@autodl-container-1421458302-fdce35d0:~/autodl-tmp/GPT-SoVITS# python -m pip install --no-cache-dir --force-reinstall \
> --index-url https://download.pytorch.org/whl/cpu \
> torchcodec==0.11.1
Looking in indexes: https://download.pytorch.org/whl/cpu
Collecting torchcodec==0.11.1
Downloading https://download.pytorch.org/whl/cpu/torchcodec-0.11.1%2Bcpu-cp310-cp310-manylinux_2_28_x86_64.whl.metadata (11 kB)
Downloading https://download.pytorch.org/whl/cpu/torchcodec-0.11.1%2Bcpu-cp310-cp310-manylinux_2_28_x86_64.whl (2.3 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.3/2.3 MB 3.2 MB/s 0:00:01
Installing collected packages: torchcodec
Successfully installed torchcodec-0.11.1+cpu
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
(GPTSoVits) root@autodl-container-1421458302-fdce35d0:~/autodl-tmp/GPT-SoVITS#
(GPTSoVits) root@autodl-container-1421458302-fdce35d0:~/autodl-tmp/GPT-SoVITS#
(GPTSoVits) root@autodl-container-1421458302-fdce35d0:~/autodl-tmp/GPT-SoVITS# python -m pip show torchcodec
Name: torchcodec
Version: 0.11.1+cpu
Summary: A video decoder for PyTorch
Home-page:
Author:
Author-email: PyTorch Team <packages@pytorch.org>
License: BSD 3-Clause License
Copyright 2024 Meta
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,this list
of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may
be used to endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
Location: /root/miniconda3/envs/GPTSoVits/lib/python3.10/site-packages
Requires:
Required-by:
(GPTSoVits) root@autodl-container-1421458302-fdce35d0:~/autodl-tmp/GPT-SoVITS#
- Fix the FFmpeg shared library path by exporting
LD_LIBRARY_PATH:
(GPTSoVits) root@autodl-container-1421458302-fdce35d0:~/autodl-tmp/GPT-SoVITS# ffmpeg -version
ffmpeg version 8.0.1 Copyright (c) 2000-2025 the FFmpeg developers
built with gcc 14.3.0 (GCC)
configuration: --prefix=/home/task_177790567462050/croot/ffmpeg_1777905727578/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac --cc=/home/task_177790567462050/croot/ffmpeg_1777905727578/_build_env/bin/x86_64-conda-linux-gnu-cc --cxx=/home/task_177790567462050/croot/ffmpeg_1777905727578/_build_env/bin/x86_64-conda-linux-gnu-c++ --nm=/home/task_177790567462050/croot/ffmpeg_1777905727578/_build_env/bin/x86_64-conda-linux-gnu-nm --ar=/home/task_177790567462050/croot/ffmpeg_1777905727578/_build_env/bin/x86_64-conda-linux-gnu-ar --enable-openssl --enable-demuxer=dash --enable-hardcoded-tables --enable-libfreetype --enable-libharfbuzz --enable-libfontconfig --enable-libopenh264 --enable-libdav1d --enable-libmp3lame --enable-libaom --enable-libsvtav1 --enable-libxml2 --enable-pic --enable-shared --enable-version3 --enable-zlib --enable-libvorbis --enable-libopus --enable-libwebp --enable-libshaderc --disable-ffplay --disable-static --disable-gpl --disable-doc --pkg-config=/home/task_177790567462050/croot/ffmpeg_1777905727578/_build_env/bin/pkg-config --arch=x86_64 --target-os=linux --cross-prefix=x86_64-conda-linux-gnu- --host-cc=/home/task_177790567462050/croot/ffmpeg_1777905727578/_build_env/bin/x86_64-conda-linux-gnu-cc --disable-gnutls --enable-libvpx --enable-pthreads --enable-alsa --enable-libpulse --enable-libdrm --enable-libvpl --enable-vaapi --enable-libtesseract --enable-libvpx --enable-libass --enable-librsvg
libavutil 60. 8.100 / 60. 8.100
libavcodec 62. 11.100 / 62. 11.100
libavformat 62. 3.100 / 62. 3.100
libavdevice 62. 1.100 / 62. 1.100
libavfilter 11. 4.100 / 11. 4.100
libswscale 9. 1.100 / 9. 1.100
libswresample 6. 1.100 / 6. 1.100
Exiting with exit code 0
(GPTSoVits) root@autodl-container-1421458302-fdce35d0:~/autodl-tmp/GPT-SoVITS#
(GPTSoVits) root@autodl-container-1421458302-fdce35d0:~/autodl-tmp/GPT-SoVITS#
(GPTSoVits) root@autodl-container-1421458302-fdce35d0:~/autodl-tmp/GPT-SoVITS# ls $CONDA_PREFIX/lib/libavutil.so*
/root/miniconda3/envs/GPTSoVits/lib/libavutil.so /root/miniconda3/envs/GPTSoVits/lib/libavutil.so.60 /root/miniconda3/envs/GPTSoVits/lib/libavutil.so.60.8.100
(GPTSoVits) root@autodl-container-1421458302-fdce35d0:~/autodl-tmp/GPT-SoVITS# ls $CONDA_PREFIX/lib/libavcodec.so*
/root/miniconda3/envs/GPTSoVits/lib/libavcodec.so /root/miniconda3/envs/GPTSoVits/lib/libavcodec.so.62 /root/miniconda3/envs/GPTSoVits/lib/libavcodec.so.62.11.100
(GPTSoVits) root@autodl-container-1421458302-fdce35d0:~/autodl-tmp/GPT-SoVITS# ls $CONDA_PREFIX/lib/libavformat.so*
/root/miniconda3/envs/GPTSoVits/lib/libavformat.so /root/miniconda3/envs/GPTSoVits/lib/libavformat.so.62 /root/miniconda3/envs/GPTSoVits/lib/libavformat.so.62.3.100
(GPTSoVits) root@autodl-container-1421458302-fdce35d0:~/autodl-tmp/GPT-SoVITS# ls $CONDA_PREFIX/lib/libstdc++.so*
/root/miniconda3/envs/GPTSoVits/lib/libstdc++.so /root/miniconda3/envs/GPTSoVits/lib/libstdc++.so.6 /root/miniconda3/envs/GPTSoVits/lib/libstdc++.so.6.0.34
(GPTSoVits) root@autodl-container-1421458302-fdce35d0:~/autodl-tmp/GPT-SoVITS#
(GPTSoVits) root@autodl-container-1421458302-fdce35d0:~/autodl-tmp/GPT-SoVITS# echo $LD_LIBRARY_PATH
(GPTSoVits) root@autodl-container-1421458302-fdce35d0:~/autodl-tmp/GPT-SoVITS#
(GPTSoVits) root@autodl-container-1421458302-fdce35d0:~/autodl-tmp/GPT-SoVITS# export LD_LIBRARY_PATH="$CONDA_PREFIX/lib:$LD_LIBRARY_PATH"
(GPTSoVits) root@autodl-container-1421458302-fdce35d0:~/autodl-tmp/GPT-SoVITS#
(GPTSoVits) root@autodl-container-1421458302-fdce35d0:~/autodl-tmp/GPT-SoVITS# echo $LD_LIBRARY_PATH
/root/miniconda3/envs/GPTSoVits/lib:
(GPTSoVits) root@autodl-container-1421458302-fdce35d0:~/autodl-tmp/GPT-SoVITS#
Fish Speech
Repository: https://github.com/fishaudio/fish-speech
Fish Audio S2 Pro is a state-of-the-art multimodal audio model developed by Fish Audio. Trained on over 10 million hours of audio covering more than 80 languages, it uses a Dual-Autoregressive (Dual-AR) architecture combined with reinforcement learning (RL) alignment to produce natural, realistic, and expressive speech that competes with both open-source and proprietary systems.
Deployment & Verification
- Install system dependencies
apt-get update
apt install portaudio19-dev libsox-dev ffmpeg
- Clone the repository
git clone https://github.com/fishaudio/fish-speech.git
cd fish-speech
- Create a Conda environment
conda create -n fish-speech python=3.12 -y
conda activate fish-speech
- Install Python dependencies
pip install -e .[cu128]
- Download model weights
# Optional Hugging Face mirror for users in China:
# export HF_ENDPOINT="https://hf-mirror.com"
hf download fishaudio/s2-pro --local-dir checkpoints/s2-pro
- Run a synthesis test
- Option 1: Command line
python fish_speech/models/dac/inference.py \
-i "test.wav" \
--checkpoint-path "checkpoints/s2-pro/codec.pth"
# test.wav is the reference audio; this outputs fake.npy and fake.wav.
python fish_speech/models/text2semantic/inference.py \
--text "Target text to synthesize" \
--prompt-text "Exact transcript of the reference audio" \
--prompt-tokens "fake.npy"
# This generates codes_0.npy under the output directory.
python fish_speech/models/dac/inference.py \
-i "./output/codes_0.npy" \
--checkpoint-path "checkpoints/s2-pro/codec.pth"
# The final synthesized speech is saved as fake.wav.
- Option 2: API server
Start the API server:
python tools/api_server.py \
--llama-checkpoint-path checkpoints/s2-pro \
--decoder-checkpoint-path checkpoints/s2-pro/codec.pth \
--listen 0.0.0.0:8080
Send a synthesis request via the API client:
python tools/api_client.py \
--url http://127.0.0.1:8080/v1/tts \
--reference_audio "path/to/reference.wav" \
--reference_text "Transcript of the reference audio" \
--text "Target text to synthesize" \
--no-play
By default, the synthesized file is saved as generated_audio.wav.
Synthesis took 1+ minute via the CLI and 30+ seconds via the API. Here is the generated audio:
Troubleshooting
fatal error: portaudio.h: No such file or directory
Install portaudio via conda-forge:
conda install -y -c conda-forge portaudio
Verify that the header exists:
find $CONDA_PREFIX -name portaudio.h
Then retry the installation:
pip install -e .[cu128]
python tools/api_client.pyfails withOSError: [Errno -9996] Invalid output device (no default output device)
Pass the --no-play flag so the client skips local audio playback on headless servers.
VoxCPM
Repository: https://github.com/OpenBMB/VoxCPM
Deployment & Verification
- Install the package
pip install voxcpm
- Run a synthesis test
voxcpm clone \
--text "This is a cloned voice sample." \
--reference-audio path/to/voice.wav \
--output out.wav
In the CLI, --text specifies the text to synthesize, --reference-audio points to the reference audio file, and --output sets the output file path.
The first run takes longer because it downloads the model weights, after which synthesis took around 7 seconds. Here is the generated audio:
Side-by-Side Output Comparison
Reference Audio
IndexTTS-2
CosyVoice
GPT-SoVITS
Fish Speech
VoxCPM
From listening to the results, IndexTTS-2, CosyVoice, Fish Speech, and VoxCPM show higher overall polish, though IndexTTS-2 takes noticeably longer to generate audio.
Summary & Recommendations
The conclusions below are based on deploying and listening to outputs using the same hardware, reference audio, and target text, and are intended as a record for this evaluation:
| Solution | Measured Time | Notes from This Test |
|---|---|---|
| IndexTTS-2 | 2+ minutes | High audio polish, but synthesis takes noticeably longer. |
| CosyVoice | ~24 seconds | High audio polish. |
| GPT-SoVITS | Under 10 seconds | Deployed and verified with listening tests. |
| Fish Speech | CLI: 1+ min; API: 30+ s | High audio polish. |
| VoxCPM | ~7 seconds | Simple setup, strong audio quality, and supports CPU, CUDA, and MPS. |
If I had to pick just one to get up and running quickly, I currently recommend VoxCPM: in these tests it was the easiest to deploy, delivered results that met expectations, and supports CPU, CUDA, and MPS out of the box. As always, verify final quality with your own reference audio, target text, and hardware.
If you want to turn the cloned voiceover into a talking-head video, you will also need audio-to-lip synchronization — continue reading 2026 Lip-Sync Video Synthesis Comparison. To see how these two capabilities fit together in a full workflow, check out my talking-head video remix tool VideoRemaker (in Chinese).