Bark Voice Cloning and Voice Cloning for Chinese Speech
Jupyter Notebook
2,947
382 commits
updated May 31, 2026
English (default) | 简体中文
This repository is a practical one-click hub for leading open-source voice cloning, TTS, and voice conversion models. It started as a Bark voice cloning project and has grown into a curated collection of state-of-the-art open-source audio generation workflows with ready-to-use Web UIs and Colab notebooks.
The goal is simple: users should be able to click a notebook, run the setup, and immediately try advanced AI voice cloning technology without assembling each model pipeline by hand.
It is focused on:
app.py
.npz prompt), TTS, Voice Conversioncloning/clonevoice.py, swap_voice.py, bark/, util/, training/sambert-ui/app.py (local), sambert-ui/app_colab.py (Colab-friendly)training/training_prepare.py, training/train.py, training/data.pypip install -r requirements.txt
python app.py
./models/ (see bark/generation.py)../models/hubert/ (see bark/hubert/hubert_manager.py).outputs/ by default (configurable via config.yaml → output_folder_path).The Bark UI’s “Create Voice” feature writes a .npz prompt file. The default path in app.py is set for Colab (/content/...).
If you run locally, you may need to update that destination path to a valid path on your machine (e.g. inside bark/assets/prompts/).
Sambert UI provides a full pipeline: auto labeling → training → inference.
cd sambert-ui
pip install -r requirements.txt
python app.py
More details: sambert-ui/README.md
bark/api.py (generate_with_settings, semantic_to_waveform)app.py (generate_text_to_speech)cloning/clonevoice.py (HuBERT + tokenizer + EnCodec → save .npz)swap_voice.py (HuBERT tokens + Bark semantic_to_waveform with history_prompt)training/training_prepare.py: generate semantic tokens from text, then synthesize wav pairstraining/train.py: prepare HuBERT-ready features and trigger tokenizer training (calls bark/hubert/customtokenizer.py)training/data.py: text sourcing / filtering helpersMost notebooks are designed as one-click Colab demos: open the notebook, run the cells, and try the corresponding model with minimal local setup.
Voice-related notebooks are grouped under:
notebooks/tts/ (TTS / voice cloning)notebooks/vc/ (voice conversion; any notebook with VC in its filename)Bark_Voice_Cloning.ipynb, Bark_Coqui.ipynbVoice_Cloning_for_Chinese_Speech_v2.ipynb, SambertHifigan.ipynb, Sambert_Voice_Cloning_in_One_Click.ipynb, Sambert_UI.ipynbGPT_SoVITS.ipynb, GPT_SoVITS_2.ipynb, GPT_SoVITS_emo.ipynb, GPT_SoVITS_v2_0808.ipynb, GPT_SoVITS_v3.ipynb, GPT_SoVITS_v3_03_30.ipynb, GPT_SoVITS_v4.ipynbXTTS_Colab.ipynbVALL_E_X.ipynbF5_TTS.ipynb, F5_TTS_Training.ipynbCosyVoice.ipynb, CosyVoice2.ipynbOpenVoice.ipynb, Seamless_Meta.ipynbKNN_VC.ipynbNeuCoSVC.ipynb, NeuCoSVC_v2_先享版.ipynbOpenAI_TTS_KNN_VC.ipynb, OpenAI_TTS_KNN_VC_en.ipynb, OpenAI_TTS_RVC.ipynb.
├── app.py # Bark Gradio UI (voice cloning / TTS / voice conversion)
├── bark/ # Bark core + HuBERT utilities
├── cloning/ # Voice cloning (audio -> .npz prompt)
├── training/ # Experimental training utilities
├── swap_voice.py # Voice conversion helper
├── util/ # Settings + SSML/text helpers
├── config.yaml # UI + output configuration
├── sambert-ui/ # Sambert UI (label/train/infer)
└── notebooks/
├── tts/ # TTS / voice cloning notebooks
├── vc/ # Voice conversion notebooks (filenames contain "VC")
└── ... # Other notebooks (LLM/agent/video/etc.)
This repository is intended for research and learning. Please comply with local laws and obtain proper consent before cloning or converting any voice.
10/19/2023: Fixed
ERROR: Exception in ASGI applicationby specifyinggradio==3.33.0andgradio_client==0.2.7in requirements.txt.
11/08/2023: Integrated KNN-VC into OpenAI TTS and created an easy-to-use Gradio interface. Try it here.
02/27/2024: We are thrilled to launch our most powerful AI song cover generator ever with Shanghai Artificial Intelligence Laboratory! Just need to provide the name of a song and our application running on an A100 GPU will handle everything else. Check it out in our website (please click "EN" in the first tab of our website to see the english version)! 💕
Based on bark-gui and bark. Thanks to C0untFloyd.
Quick start: Colab Notebook ⚡
HuggingFace Demo: Bark Voice Cloning 🤗 (Need a GPU)
Demo Video: YouTube Video
If you would like to run the code locally, remember to replace the original path /content/Bark-Voice-Cloning/bark/assets/prompts/file.npz with the path of file.npz in your own computer.
(1) First upload audio for voice cloning and click Create Voice.
(2) Choose the option called "file" in Voice if you'd like to use voice cloning.
(3) Click Generate. Done!
10/26/2023: Integrated labeling, training and inference into an easy-to-use user interface of SambertHifigan. Thanks to wujohns.
We want to point out that Bark is very good at generating English speech but relatively poor at generating Chinese speech. So we'd like to adopt another approach, which is called SambertHifigan, to realizing voice cloning for Chinese speech. Please check out our Colab Notebook for the implementation.
Quick start: Colab Notebook ⚡
HuggingFace demo: Voice Cloning for Chinese Speech 🤗
892 followers · starred Mar 2024
257 followers · starred Aug 2024
277 followers · starred May 2024
24 followers · starred Nov 2023
Bark Voice Cloning and Voice Cloning for Chinese Speech
Jupyter Notebook
2,947
382 commits
updated May 31, 2026
English (default) | 简体中文
This repository is a practical one-click hub for leading open-source voice cloning, TTS, and voice conversion models. It started as a Bark voice cloning project and has grown into a curated collection of state-of-the-art open-source audio generation workflows with ready-to-use Web UIs and Colab notebooks.
The goal is simple: users should be able to click a notebook, run the setup, and immediately try advanced AI voice cloning technology without assembling each model pipeline by hand.
It is focused on:
app.py
.npz prompt), TTS, Voice Conversioncloning/clonevoice.py, swap_voice.py, bark/, util/, training/sambert-ui/app.py (local), sambert-ui/app_colab.py (Colab-friendly)training/training_prepare.py, training/train.py, training/data.pypip install -r requirements.txt
python app.py
./models/ (see bark/generation.py)../models/hubert/ (see bark/hubert/hubert_manager.py).outputs/ by default (configurable via config.yaml → output_folder_path).The Bark UI’s “Create Voice” feature writes a .npz prompt file. The default path in app.py is set for Colab (/content/...).
If you run locally, you may need to update that destination path to a valid path on your machine (e.g. inside bark/assets/prompts/).
Sambert UI provides a full pipeline: auto labeling → training → inference.
cd sambert-ui
pip install -r requirements.txt
python app.py
More details: sambert-ui/README.md
bark/api.py (generate_with_settings, semantic_to_waveform)app.py (generate_text_to_speech)cloning/clonevoice.py (HuBERT + tokenizer + EnCodec → save .npz)swap_voice.py (HuBERT tokens + Bark semantic_to_waveform with history_prompt)training/training_prepare.py: generate semantic tokens from text, then synthesize wav pairstraining/train.py: prepare HuBERT-ready features and trigger tokenizer training (calls bark/hubert/customtokenizer.py)training/data.py: text sourcing / filtering helpersMost notebooks are designed as one-click Colab demos: open the notebook, run the cells, and try the corresponding model with minimal local setup.
Voice-related notebooks are grouped under:
notebooks/tts/ (TTS / voice cloning)notebooks/vc/ (voice conversion; any notebook with VC in its filename)Bark_Voice_Cloning.ipynb, Bark_Coqui.ipynbVoice_Cloning_for_Chinese_Speech_v2.ipynb, SambertHifigan.ipynb, Sambert_Voice_Cloning_in_One_Click.ipynb, Sambert_UI.ipynbGPT_SoVITS.ipynb, GPT_SoVITS_2.ipynb, GPT_SoVITS_emo.ipynb, GPT_SoVITS_v2_0808.ipynb, GPT_SoVITS_v3.ipynb, GPT_SoVITS_v3_03_30.ipynb, GPT_SoVITS_v4.ipynbXTTS_Colab.ipynbVALL_E_X.ipynbF5_TTS.ipynb, F5_TTS_Training.ipynbCosyVoice.ipynb, CosyVoice2.ipynbOpenVoice.ipynb, Seamless_Meta.ipynbKNN_VC.ipynbNeuCoSVC.ipynb, NeuCoSVC_v2_先享版.ipynbOpenAI_TTS_KNN_VC.ipynb, OpenAI_TTS_KNN_VC_en.ipynb, OpenAI_TTS_RVC.ipynb.
├── app.py # Bark Gradio UI (voice cloning / TTS / voice conversion)
├── bark/ # Bark core + HuBERT utilities
├── cloning/ # Voice cloning (audio -> .npz prompt)
├── training/ # Experimental training utilities
├── swap_voice.py # Voice conversion helper
├── util/ # Settings + SSML/text helpers
├── config.yaml # UI + output configuration
├── sambert-ui/ # Sambert UI (label/train/infer)
└── notebooks/
├── tts/ # TTS / voice cloning notebooks
├── vc/ # Voice conversion notebooks (filenames contain "VC")
└── ... # Other notebooks (LLM/agent/video/etc.)
This repository is intended for research and learning. Please comply with local laws and obtain proper consent before cloning or converting any voice.
10/19/2023: Fixed
ERROR: Exception in ASGI applicationby specifyinggradio==3.33.0andgradio_client==0.2.7in requirements.txt.
11/08/2023: Integrated KNN-VC into OpenAI TTS and created an easy-to-use Gradio interface. Try it here.
02/27/2024: We are thrilled to launch our most powerful AI song cover generator ever with Shanghai Artificial Intelligence Laboratory! Just need to provide the name of a song and our application running on an A100 GPU will handle everything else. Check it out in our website (please click "EN" in the first tab of our website to see the english version)! 💕
Based on bark-gui and bark. Thanks to C0untFloyd.
Quick start: Colab Notebook ⚡
HuggingFace Demo: Bark Voice Cloning 🤗 (Need a GPU)
Demo Video: YouTube Video
If you would like to run the code locally, remember to replace the original path /content/Bark-Voice-Cloning/bark/assets/prompts/file.npz with the path of file.npz in your own computer.
(1) First upload audio for voice cloning and click Create Voice.
(2) Choose the option called "file" in Voice if you'd like to use voice cloning.
(3) Click Generate. Done!
10/26/2023: Integrated labeling, training and inference into an easy-to-use user interface of SambertHifigan. Thanks to wujohns.
We want to point out that Bark is very good at generating English speech but relatively poor at generating Chinese speech. So we'd like to adopt another approach, which is called SambertHifigan, to realizing voice cloning for Chinese speech. Please check out our Colab Notebook for the implementation.
Quick start: Colab Notebook ⚡
HuggingFace demo: Voice Cloning for Chinese Speech 🤗
892 followers · starred Mar 2024
257 followers · starred Aug 2024
277 followers · starred May 2024
24 followers · starred Nov 2023