TTS Channel: clone-voice
The model used in this project is xtts_v2 from coqui.ai. The model is released under the Coqui Public Model License 1.0.0. Please follow this license when using the project. Full license text: https://coqui.ai/cpml.txt
What is clone-voice
clone-voice is a voice cloning tool that uses any human voice to synthesize speech from text, or convert one voice into another using that voice's characteristics.
Key features:
- Easy to use: Works without an NVIDIA GPU. Download the pre-compiled version, double-click
app.exeto open the web interface, and use it with just mouse clicks - Multi-language support: Supports 16 languages including Chinese, English, Japanese, Korean, French, German, Italian, and more
- Online recording: Record voice directly from the microphone as reference audio
- Quality: Excellent for English; passable for Chinese
Model limitation: The xtts model can only be used for learning and research purposes, not for commercial use.
Prerequisites
| Requirement | Details |
|---|---|
| Operating System | Windows (pre-compiled), Linux, macOS (source deployment) |
| Disk Space | Pre-compiled: ~4.7GB (main: 1.7G + model: 3G) |
| Python | Source deployment requires Python 3.9–3.11 |
| GPU | Optional; NVIDIA GPU enables CUDA acceleration |
Windows Pre-compiled Version
Step 1: Download
Open the Releases download page and download:
- Pre-compiled main file (~1.7GB)
- Model file (~3GB)
Step 2: Extract
Extract to a location, e.g., E:/clone-voice
Step 3: Extract the Model
Extract the downloaded model into the tts folder inside the software directory. After extraction:
The
ttsfolder should contain 3 subdirectories.
Step 4: Launch
- Double-click
app.exe - Wait for the web window to open automatically
- Read the text prompts in the cmd window carefully — any errors will be displayed there
On first launch, the model needs to cold-load, which takes some time. Wait for
http://127.0.0.1:9988to appear and the browser page to open, then wait another 2–3 minutes before performing conversions.
Step 5: Use
Text → Voice
- Select the "Text → Voice" button
- Enter text in the text box, or click to import an SRT subtitle file
- Click "Start Now"
Voice → Voice
- Select the "Voice → Voice" button
- Click or drag the audio file to convert (mp3/wav/flac)
- Select the voice to clone from the "Voice File to Use" dropdown
- If no suitable option, click "Upload" to select a 5–20s pre-recorded voice file
- Or click "Start Recording" to record 5–20s of voice online
- Click "Start Now"
If your machine has an NVIDIA GPU with a properly configured CUDA environment, CUDA acceleration will be used automatically.
Source Deployment (Linux / Mac / Windows)
Deployment Steps
Install Python and Git: Python 3.9–3.11 required. Install Git
Clone the source code:
bash# Create an empty directory, e.g., E:/clone-voice # Open cmd in that directory and run: git clone [email protected]:jianchang512/clone-voice.git .Create a virtual environment:
bashpython -m venv venvActivate the environment (Windows):
bashE:/clone-voice/venv/scripts/activateInstall dependencies:
bashpip install -r requirements.txt --no-depsEnable CUDA acceleration (optional, requires NVIDIA GPU):
bashpip uninstall -y torch pip install torch torchaudio --index-url https://download.pytorch.org/whl/cu121Install FFmpeg:
- Windows: Extract
ffmpeg.7zand placeffmpeg.exein the same directory asapp.py - Linux/macOS: Download from FFmpeg official site and place the
ffmpegexecutable in the root directory
- Windows: Extract
First run to download model:
bashpython code_dev.py- Enter
ywhen prompted to accept the license - Wait for the model download to complete
- Enter
Start the service:
bashpython app.pyTrain the model (optional):
bashpython train.pyTraining parameters can be adjusted in
param.json.
Using in pyVideoTrans
- Start clone-voice's web interface (default:
http://127.0.0.1:9988) - Open pyVideoTrans, go to Menu → TTS Settings → clone-voice
- Enter the API address:
http://127.0.0.1:9988 - Click "Test" — if no errors, configuration is successful
- Select "clone-voice" from the "TTS Channel" dropdown on the main screen
Reference Audio Requirements
| Item | Requirement |
|---|---|
| Format | WAV, MP3, or FLAC |
| Duration | 5–20 seconds (ideal) for best synthesis quality |
| Content | Clear, accurate pronunciation, no background noise |
| Languages | Supports 16 languages |
Troubleshooting
1. Model Download Stalls or Fails
The model is hosted on huggingface.co. If the download fails repeatedly, try using a network proxy or mirror.
2. Model Check/Update on Every Launch
Each startup connects to check or update the model. To disable this, edit the dependency package:
Open \venv\Lib\site-packages\TTS\utils\manage.py, around line 389, in the def download_model method, comment out the block from if md5sum is not None: to the else.
3. Stuck After Launch
On first launch, the model needs to cold-load, which takes time. Wait for http://127.0.0.1:9988 to appear and the browser page to open, then wait another 2–3 minutes before performing conversions.
4. cmd Window Freezes, Requires Enter to Continue
Click the icon in the top-left corner of the cmd window, select "Properties", and uncheck "QuickEdit Mode" and "Insert Mode".
5. Voice-to-Voice Thread Startup Failure
First, verify the model is correctly placed (the tts folder should contain 3 subdirectories):
If correctly placed but still failing, download extra-to-tts_cache.zip and copy the 2 extracted files to the tts_cache folder in the software root directory.
If the above doesn't work, configure a stable network proxy.
6. Text Length Exceeds Limit
The text length exceeds the character limit of 182/82 for languageSentences separated by periods are too long. Break long sentences with periods rather than commas, or manually edit clone/character.json to adjust the limit.
7. Error symbol not found __svml_cosf8_ha
Download the DLL from https://www.dll-files.com/svml_dispmd.dll.html and copy it to C:\Windows\System32.
CUDA Acceleration
Installing CUDA Tools
- Update your GPU driver to the latest version
- Install CUDA Toolkit 11.8
- Install cuDNN for CUDA 11.X
Verify Installation
Press Win + R, type cmd, press Enter, then run:
nvcc --versionConfirm version information is displayed:
Then run:
nvidia-smiConfirm output is displayed and the CUDA version is visible:
If both commands produce output, CUDA is installed correctly and can be used for acceleration. Otherwise, reinstall.
