thangquang09/vietnamese-parlertts

1

stars

7

commits

Python

primary language

Mar 27, 2026

updated

README

🇻🇳 Vietnamese Parler-TTS Voice Design

Instruction-guided Vietnamese Text-to-Speech with natural language voice control

🤗 Model  |  📄 Original Paper  |  🔧 Upstream Repo

Python PyTorch License


🔊 What is this?

This is a Vietnamese adaptation of Parler-TTS, focused on instruction-guided speech generation.

You describe the voice you want in natural language, for example:

  • Giọng nữ trẻ miền Bắc, nói chậm rãi, giọng cao
  • Giọng nam trưởng thành miền Nam, nói nhanh và rất to
  • Giọng nữ miền Trung, nói chậm rãi với âm lượng nhỏ, giọng trầm

and the model generates Vietnamese speech that matches the description.

This repository is intentionally kept inference-first:

  • api.py for CLI and Python usage
  • app.py for a Gradio web UI
  • parler_tts/ for the underlying Parler-TTS model code

The default model repository is:

Key Changes from Original Parler-TTS

ComponentOriginalThis Fork
LanguageEnglish-focusedVietnamese
Text encoderFlan-T5 familyViT5-based Vietnamese setup
Main use caseGeneral controllable TTSVietnamese voice design / instruction TTS
Repository scopeFull training + inferenceClean inference-first release

⚡ Quick Start

Installation

git clone https://github.com/thangquang09/vietnamese-parlertts.git
cd vietnamese-parlertts
pip install -e .

For the Gradio app:

pip install -e .[app]

Inference (CLI)

Generate speech from the default Hugging Face repo:

python api.py \
    --text "Xin chào, hôm nay bạn có khoẻ không?" \
    --description "Giọng nữ trẻ miền Bắc, nói chậm rãi, giọng cao" \
    --output output.wav

Use a specific Hugging Face repo:

python api.py \
    --text "Thời tiết hôm nay rất đẹp." \
    --description "Giọng nam trung niên, nhịp nói vừa phải." \
    --hf-repo thangquang09/parler-tts-vietnamese-v1-stage2

Use a local checkpoint directory:

python api.py \
    --text "Xin chào" \
    --description "Giọng nữ trẻ, âm lượng vừa" \
    --model /path/to/local/model_dir

The model will be loaded automatically from Hugging Face or from your local checkpoint directory, depending on the arguments you pass.

Inference (Python API)

from api import ParlerTTSAPI

# Load default Hugging Face repo
tts = ParlerTTSAPI(device="cuda:0")

tts.synthesize(
    text="Hôm nay trời đẹp quá.",
    description="Giọng nữ trẻ miền Bắc, nói chậm rãi và nhẹ nhàng.",
    output_path="output.wav",
)

Load a custom source:

# Specific HF repo
tts = ParlerTTSAPI(hf_model_repo="thangquang09/parler-tts-vietnamese-v1-stage2")

# Or local checkpoint
tts = ParlerTTSAPI(model_name_or_path="/path/to/local/model_dir")

Web UI (Gradio)

Run the web UI with the default model:

python app.py

Use a specific Hugging Face repo:

python app.py --hf_model_repo thangquang09/parler-tts-vietnamese-v1-stage2

Use a local checkpoint:

python app.py --model /path/to/local/model_dir

Then open http://localhost:7860 in your browser.

Features:

  • 🎚️ Adjustable temperature and seed
  • 📋 Pre-built Vietnamese examples
  • 🔊 Direct audio playback
  • 🌐 Optional public link with --share

🧩 Model Loading Behavior

The inference entrypoints are designed to be flexible:

  • --model has the highest priority and can be either a local path or a repo ID
  • if --model is not provided, api.py uses --hf-repo
  • if --model is not provided, app.py uses --hf_model_repo or --hf-repo
  • if nothing is provided, both use thangquang09/parler-tts-vietnamese-v1-stage2

This makes it easy to switch between:

  • a public Hugging Face release
  • a private Hugging Face repo
  • a local fine-tuned checkpoint

📁 Project Structure

├── api.py                 # Main inference API and CLI
├── app.py                 # Gradio web UI
├── parler_tts/            # Core Parler-TTS model code
├── setup.py
├── pyproject.toml
└── README.md

📦 Hugging Face Model

Default model:

📝 Citation

This project is based on Parler-TTS:

@misc{lacombe-etal-2024-parler-tts,
  author = {Yoach Lacombe and Vaibhav Srivastav and Sanchit Gandhi},
  title = {Parler-TTS},
  year = {2024},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/huggingface/parler-tts}}
}
@misc{lyth2024natural,
  title={Natural language guidance of high-fidelity text-to-speech with synthetic annotations},
  author={Dan Lyth and Simon King},
  year={2024},
  eprint={2402.01912},
  archivePrefix={arXiv},
  primaryClass={cs.SD}
}

📜 License

Licensed under Apache License 2.0.

🙏 Acknowledgements

  • Parler-TTS — base model, architecture, and open-source release
  • VietAI/vit5-large — Vietnamese text encoder setup used in this adaptation

Contributors

thangquang09

7 commits

thangquang09/vietnamese-parlertts

1

stars

7

commits

Python

primary language

Mar 27, 2026

updated

README

🇻🇳 Vietnamese Parler-TTS Voice Design

Instruction-guided Vietnamese Text-to-Speech with natural language voice control

🤗 Model  |  📄 Original Paper  |  🔧 Upstream Repo

Python PyTorch License


🔊 What is this?

This is a Vietnamese adaptation of Parler-TTS, focused on instruction-guided speech generation.

You describe the voice you want in natural language, for example:

  • Giọng nữ trẻ miền Bắc, nói chậm rãi, giọng cao
  • Giọng nam trưởng thành miền Nam, nói nhanh và rất to
  • Giọng nữ miền Trung, nói chậm rãi với âm lượng nhỏ, giọng trầm

and the model generates Vietnamese speech that matches the description.

This repository is intentionally kept inference-first:

  • api.py for CLI and Python usage
  • app.py for a Gradio web UI
  • parler_tts/ for the underlying Parler-TTS model code

The default model repository is:

Key Changes from Original Parler-TTS

ComponentOriginalThis Fork
LanguageEnglish-focusedVietnamese
Text encoderFlan-T5 familyViT5-based Vietnamese setup
Main use caseGeneral controllable TTSVietnamese voice design / instruction TTS
Repository scopeFull training + inferenceClean inference-first release

⚡ Quick Start

Installation

git clone https://github.com/thangquang09/vietnamese-parlertts.git
cd vietnamese-parlertts
pip install -e .

For the Gradio app:

pip install -e .[app]

Inference (CLI)

Generate speech from the default Hugging Face repo:

python api.py \
    --text "Xin chào, hôm nay bạn có khoẻ không?" \
    --description "Giọng nữ trẻ miền Bắc, nói chậm rãi, giọng cao" \
    --output output.wav

Use a specific Hugging Face repo:

python api.py \
    --text "Thời tiết hôm nay rất đẹp." \
    --description "Giọng nam trung niên, nhịp nói vừa phải." \
    --hf-repo thangquang09/parler-tts-vietnamese-v1-stage2

Use a local checkpoint directory:

python api.py \
    --text "Xin chào" \
    --description "Giọng nữ trẻ, âm lượng vừa" \
    --model /path/to/local/model_dir

The model will be loaded automatically from Hugging Face or from your local checkpoint directory, depending on the arguments you pass.

Inference (Python API)

from api import ParlerTTSAPI

# Load default Hugging Face repo
tts = ParlerTTSAPI(device="cuda:0")

tts.synthesize(
    text="Hôm nay trời đẹp quá.",
    description="Giọng nữ trẻ miền Bắc, nói chậm rãi và nhẹ nhàng.",
    output_path="output.wav",
)

Load a custom source:

# Specific HF repo
tts = ParlerTTSAPI(hf_model_repo="thangquang09/parler-tts-vietnamese-v1-stage2")

# Or local checkpoint
tts = ParlerTTSAPI(model_name_or_path="/path/to/local/model_dir")

Web UI (Gradio)

Run the web UI with the default model:

python app.py

Use a specific Hugging Face repo:

python app.py --hf_model_repo thangquang09/parler-tts-vietnamese-v1-stage2

Use a local checkpoint:

python app.py --model /path/to/local/model_dir

Then open http://localhost:7860 in your browser.

Features:

  • 🎚️ Adjustable temperature and seed
  • 📋 Pre-built Vietnamese examples
  • 🔊 Direct audio playback
  • 🌐 Optional public link with --share

🧩 Model Loading Behavior

The inference entrypoints are designed to be flexible:

  • --model has the highest priority and can be either a local path or a repo ID
  • if --model is not provided, api.py uses --hf-repo
  • if --model is not provided, app.py uses --hf_model_repo or --hf-repo
  • if nothing is provided, both use thangquang09/parler-tts-vietnamese-v1-stage2

This makes it easy to switch between:

  • a public Hugging Face release
  • a private Hugging Face repo
  • a local fine-tuned checkpoint

📁 Project Structure

├── api.py                 # Main inference API and CLI
├── app.py                 # Gradio web UI
├── parler_tts/            # Core Parler-TTS model code
├── setup.py
├── pyproject.toml
└── README.md

📦 Hugging Face Model

Default model:

📝 Citation

This project is based on Parler-TTS:

@misc{lacombe-etal-2024-parler-tts,
  author = {Yoach Lacombe and Vaibhav Srivastav and Sanchit Gandhi},
  title = {Parler-TTS},
  year = {2024},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/huggingface/parler-tts}}
}
@misc{lyth2024natural,
  title={Natural language guidance of high-fidelity text-to-speech with synthetic annotations},
  author={Dan Lyth and Simon King},
  year={2024},
  eprint={2402.01912},
  archivePrefix={arXiv},
  primaryClass={cs.SD}
}

📜 License

Licensed under Apache License 2.0.

🙏 Acknowledgements

  • Parler-TTS — base model, architecture, and open-source release
  • VietAI/vit5-large — Vietnamese text encoder setup used in this adaptation

Contributors

thangquang09

7 commits

Languages

Python

100.0%