Skip to content

The Independent Studio's Complete Guide to AI Voice Cloning

— Break free from platform dependency. Speak in your own voice.

A complete record of building a local voice cloning system from scratch, pitfalls and all.


Why bother?

Today's voice synthesis platforms come in two flavors.

Free ones — generic voices everywhere. Your video sounds exactly like everyone else's. Listeners know within three seconds which platform you used. Where's the distinctiveness in that?

Paid ones — billed per character. You're mentally calculating the cost of every sentence as you record, second-guessing whether to redo a take. Scale up, and the monthly invoice becomes a number that makes you wince.

Is there a third option?

Yes. Build your own.

Use open-source AI models to run a local voice synthesis service on your own machine, with your own voice, generating your own content. No character limits, no fees, your voice is yours, your style is yours. This is what an independent studio should look like.


What is this system?

Most people, hearing "build your own TTS," imagine having to write a speech synthesis program from scratch.

That's not it.

This is closer to the concept of "setting up your own server":

LayerWhat it isWhat you do
AI ModelThe brain of voice synthesis, trained by othersDownload and use
FrameworkThe environment that runs the modelInstall and configure
Your voiceA reference sample for the modelRecord 4–6 seconds of audio
Your codeThe glue connecting input and outputThis is the part you actually write

Once set up, your machine runs a local service with a web interface. You can operate it in the browser, or call its API programmatically, making it a component in your automated pipeline.

The model used in this guide is GPT-SoVITS, for straightforward reasons: excellent Chinese performance, fully Chinese interface, Voice Cloning requires only 4–6 seconds of recording, and it's open-source and commercially usable.


What do you need?

Hardware

This system isn't demanding on hardware. The test environment for this guide is an ordinary laptop with no dedicated GPU, running on pure CPU.

ConfigurationTime to generate 100–200 characters
NVIDIA GPU (6GB VRAM or more)~10–30 seconds
CPU only~150–250 seconds

If your usage isn't heavy, CPU-only is completely workable. Recording a few voiceovers per day and waiting a few minutes for the audio is entirely acceptable.

Software

  • Windows 10 / 11
  • Python (this guide uses 3.11 — reason explained below)
  • Miniconda (Python version manager)
  • VS Code (development environment)
  • Git

One concept you must understand first: Python virtual environments

Before you start installing, there's a concept you need to internalize — otherwise the pitfalls ahead will be needlessly painful.

Python package management has the concept of "environments."

Imagine your machine has multiple independent warehouses:

Your machine
├── Global Python 3.14 (system default)
├── conda environment tts (Python 3.11, the one we create)
└── .venv (VS Code sometimes creates this automatically)

Packages in each warehouse are completely independent. Something installed in warehouse A is invisible to warehouse B.

This is why so many people go crazy installing packages: the package is there, but the runtime says it can't be found. The cause is almost always the same — installed in the wrong warehouse.

GPT-SoVITS requires Python 3.11, but your machine may already have a newer version (the test environment for this guide runs 3.14). The solution is to use Miniconda to create an isolated Python 3.11 environment, completely separate from the system Python, with no interference in either direction.

Once this concept clicks, the installation steps below will make sense.


Installation

Step 1: Install Miniconda

Run the following in the VS Code terminal:

bash
winget install Anaconda.Miniconda3

After installation, close VS Code and reopen it to let environment variables take effect. (This guide's author takes an all-in-one approach and does everything in the VS Code terminal. You can use a standalone system terminal instead — the result is identical.)

After reopening, allow PowerShell to execute scripts:

bash
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

Verify conda installed correctly:

bash
conda --version

Seeing a version number means success.


Step 2: Create a Python 3.11 environment

Accept Anaconda's terms of service (run each line separately; each will prompt for confirmation — type Y and press Enter):

bash
conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/main
conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/r
conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/msys2

Create the dedicated environment:

bash
conda create -n tts python=3.11 -y

Activate the environment (do this every time before use):

bash
conda activate tts

When the terminal prefix changes from (base) to (tts), you're in.


Step 3: Clone GPT-SoVITS

Navigate to your working directory and clone the project:

bash
cd D:\your-working-directory
mkdir tts-service
cd tts-service
git clone https://github.com/RVC-Boss/GPT-SoVITS.git
cd GPT-SoVITS

Step 4: Install packages

bash
pip install -r requirements.txt

This downloads many packages and takes a few minutes. Let it run.

⚠️ Pitfall: version conflicts

After installing requirements.txt, a few packages will have conflicting versions and need manual correction:

bash
# gradio version too new — downgrade
pip install gradio==4.44.0

# starlette and fastapi version issue
pip install "fastapi==0.115.0" "starlette>=0.37.2,<0.39.0"

# jinja2 version issue
pip install jinja2==3.1.4

# other missing packages
pip install psutil pyyaml ffmpeg-python
conda install -c conda-forge editdistance

⚠️ Pitfall: torchaudio on Windows

Newer torchaudio on Windows depends on torchcodec, which isn't supported on Windows. Install the compatible version:

bash
pip install torchaudio==2.9.0 torch==2.9.0

⚠️ Pitfall: NLTK language resources

The first time you generate text mixing Chinese and English, you'll need to download NLTK's English language model:

bash
python -c "import nltk; nltk.download('averaged_perceptron_tagger_eng')"

Step 5: Download pre-trained models

GPT-SoVITS requires several pre-trained models to function, totaling around 3GB, downloaded from HuggingFace:

bash
python -c "from huggingface_hub import snapshot_download; snapshot_download('lj1995/GPT-SoVITS', local_dir='GPT_SoVITS/pretrained_models')"

Download time depends on your connection speed — roughly 30 minutes to an hour. If it stalls, press Ctrl+C and rerun; it supports resumable downloads.

Also create the cache directory for the language detection model:

bash
mkdir GPT_SoVITS\pretrained_models\fast_langdetect

Step 6: Start the service

Standard startup commands for each session:

bash
conda activate tts
cd D:\your-working-directory\tts-service\GPT-SoVITS
C:\Users\your-username\miniconda3\envs\tts\python.exe webui.py

Why use the full Python path? VS Code sometimes auto-activates the .venv environment, overriding our tts environment. Using the full path guarantees the correct Python runs every time, without interference.

When startup succeeds, the terminal displays:

Running on local URL: http://0.0.0.0:9874

The browser opens automatically and loads http://localhost:9874 — your local server is live, the entire service running on your own machine.


Generating your voice for the first time

Prepare your voice sample

Before you begin, you need a recording of your own voice as a reference audio file.

Recording tips:

  • Length: 5–10 seconds
  • Environment: a quiet room with fans and air conditioning off
  • Equipment: your phone is sufficient — modern phone microphones handle Voice Cloning well. The author's first test used a laptop's built-in microphone, and somehow it worked.
  • Content: speak naturally — no need to prepare specific lines
  • Format: MP3 or WAV both work

Transfer the recording to your computer and store it in a fixed location (e.g., D:\tts-service\my_voice.wav). You'll upload this same file every session — no need to re-record.


Open the inference interface

  1. Open http://localhost:9874 in your browser
  2. Click the 1-GPT-SoVITS-TTS tab
  3. Click the 1C-Inference sub-tab
  4. Click the orange "Open TTS Inference WebUI" button
  5. ⚠️ The button may appear unresponsive for 30+ seconds — this is normal (an older laptop without a GPU runs slowly). Wait patiently; don't click again
  6. Once started, a new browser tab opens and loads http://localhost:9872 — this is the actual voice generation interface

Parameter settings

Recommended parameters for a calm, authoritative delivery style:

ParameterRecommendedNotes
Speed1.1Slightly faster than natural, gives a more rhythmic feel
Pause between sentences0.2sNatural pauses between sentences
top_k5Lower = more stable, suitable for formal content
top_p0.8Conservative mode, reduces unnatural pronunciation
temperature0.7–1.0Lower = flatter, higher = more expressive
Split by punctuationOnCritical — makes intonation far more natural

"Split by punctuation" is the single biggest factor affecting naturalness. Enabled, the model pauses at periods and commas naturally, sounding much more like a real person rather than a machine reciting text.


Notes on mixed Chinese-English text

Mixed Chinese-English is the hardest case for TTS — language switching points create slight hesitation.

Improvement: add a comma before English proper nouns to give the model a buffer for language switching. Also, if you want to avoid the "mushy" quality on first-generation English terms, separate brand names with a space — e.g., Space X — so the model phrases them naturally rather than running them together:

# Original
SpaceX went public

# Improved
,SpaceX went public

This small trick noticeably smooths out switching hesitation.


Generation time reference (CPU mode)

Text lengthEstimated time
Under 50 characters~50–80 seconds
100–200 characters~150–250 seconds
500+ characters~10–15 minutes

⚠️ Important: Don't operate the browser while generation is running. When the CPU is processing TTS, all resources are focused on computation — scrolling the page steals resources and causes stuttering in the output audio.

Recommended workflow: click generate, go do something else, come back to review the result.


Output and saving

When generation completes, a player and download button appear in the interface.

  • Click download — the filename is audio.wav
  • Saved to your browser's default download folder
  • ⚠️ Each download overwrites the same file — rename any version you're happy with immediately

Integrating into an automated pipeline

GPT-SoVITS provides an API, so you can call it programmatically without manually operating the web interface each time.

Basic usage:

python
import requests

response = requests.get("http://localhost:9880", params={
    "text": "Today we're looking at...",
    "text_lang": "zh",
    "ref_audio_path": "D:/tts-service/my_voice.wav",
    "prompt_text": "what your reference audio says",
    "prompt_lang": "zh"
})

with open("output.wav", "wb") as f:
    f.write(response.content)

With this, your entire video production pipeline can run automatically (text generation can use Claude or any other AI platform — personal preference):

Claude generates script

GPT-SoVITS API generates audio

FFmpeg combines video

Final output

Future plans

  • Cloud / MCP deployment: Deploy the local TTS service to a cloud server, or wrap it as an MCP tool for direct AI invocation. Both approaches achieve the same goal — making this service a remotely callable API that doesn't depend on keeping a local laptop running.
  • Voice fine-tuning: Train a dedicated model with more of your own recordings to further improve voice similarity and naturalness.

Closing thoughts

From "paying platforms until it hurts" to "running a voice cloning service on your own machine" — the distance is one afternoon of setup (or one good night's sleep followed by another half-day of persisting through issues) and some patience for pitfalls.

The pitfalls are real. Version conflicts, environment confusion, Windows compatibility issues — these are part of the process, and the reason this guide documents every error along the way.

You don't need to be an engineer to do this. You just need to be willing to take it one step at a time — and when you hit an error, don't panic. Paste the message into an AI and ask.

Your voice. Your system. Your content.

This is what an independent studio should look like.


Further reading


Test environment: Windows 11, laptop without dedicated GPU, Python 3.11, GPT-SoVITS latest version
Published: June 2026

Ascentek Digital Knowledge Base