dolly-vn/dolly-audio-1000h-vietnamese
Viewer • Updated • 664k • 3.07k • 50
How to use dolly-vn/viterbox with Chatterbox:
# pip install chatterbox-tts
import torchaudio as ta
from chatterbox.tts import ChatterboxTTS
model = ChatterboxTTS.from_pretrained(device="cuda")
text = "Ezreal and Jinx teamed up with Ahri, Yasuo, and Teemo to take down the enemy's Nexus in an epic late-game pentakill."
wav = model.generate(text)
ta.save("test-1.wav", wav, model.sr)
# If you want to synthesize with a different voice, specify the audio prompt
AUDIO_PROMPT_PATH="YOUR_FILE.wav"
wav = model.generate(text, audio_prompt_path=AUDIO_PROMPT_PATH)
ta.save("test-2.wav", wav, model.sr)Viterbox là mô hình Text-to-Speech (TTS) tiếng Việt chất lượng cao, được fine-tune từ Chatterbox của Resemble AI.
| Thuộc tính | Giá trị |
|---|---|
| Sample Rate | 24,000 Hz |
| Audio Format | Mono, 16-bit |
| Vocabulary Size | 2,549 tokens |
| Max Text Length | 2,048 tokens |
| Max Audio Length | ~40 giây |
Model được fine-tune trên 3,000+ giờ dữ liệu tiếng Việt chất lượng cao:
| Dataset | Mô tả | Thời lượng | Speakers |
|---|---|---|---|
| ViVoice | Dữ liệu giọng đọc đa dạng, nhiều vùng miền | ~1,000h | 500+ |
| PhoAudiobook | Sách nói tiếng Việt, giọng chuyên nghiệp | ~1,200h | 100+ |
| Dolly-Audio | Dữ liệu nội bộ, đa phong cách | ~800h | 200+ |
Hoặc từ source:
git clone https://github.com/iamdinhthuan/viterbox
cd viterbox
pip install -e .
from viterbox import Viterbox
# Load model (tự động download)
tts = Viterbox.from_pretrained("cuda")
# Generate speech
audio = tts.generate("Xin chào, tôi là Viterbox!")
# Save to file
tts.save_audio(audio, "output.wav")
# Clone voice từ audio mẫu (3-10 giây)
audio = tts.generate(
text="Tôi có thể nói bằng giọng của bạn!",
language="vi",
audio_prompt="reference.wav",
exaggeration=0.5,
cfg_weight=0.5,
)
text = """
Việt Nam là một quốc gia nằm ở phía đông bán đảo Đông Dương.
Đất nước có hình chữ S với chiều dài hơn 1600 km.
Thủ đô Hà Nội là trung tâm văn hóa của cả nước.
"""
audio = tts.generate(
text=text,
language="vi",
sentence_pause_ms=500, # Nghỉ 0.5s giữa các câu
)
| Parameter | Type | Default | Description |
|---|---|---|---|
text |
str | required | Văn bản cần đọc |
language |
str | "vi" |
Mã ngôn ngữ ("vi" hoặc "en") |
audio_prompt |
str/Path | None | Đường dẫn audio mẫu cho voice cloning |
exaggeration |
float | 0.5 | Mức độ biểu cảm (0.0-2.0) |
cfg_weight |
float | 0.5 | Độ bám sát giọng mẫu (0.0-1.0) |
temperature |
float | 0.8 | Độ ngẫu nhiên (0.1-1.0) |
top_p |
float | 0.9 | Top-p sampling |
repetition_penalty |
float | 1.2 | Penalty cho việc lặp từ |
sentence_pause_ms |
int | 500 | Thời gian nghỉ giữa các câu (ms) |
crossfade_ms |
int | 50 | Thời gian crossfade khi ghép audio (ms) |
| Requirement | Minimum | Recommended |
|---|---|---|
| Python | 3.10+ | 3.11+ |
| CUDA | 11.8+ | 12.0+ |
| RAM | 8 GB | 16 GB |
| VRAM | 6 GB | 8 GB+ |
CC BY-NC 4.0 (Creative Commons Attribution-NonCommercial 4.0)
Liên hệ thương mại: contextbox.ai
@misc{viterbox2025,
author = {Dolly VN, ContextBoxAI},
title = {Viterbox: Vietnamese Text-to-Speech with Voice Cloning},
year = {2025},
publisher = {HuggingFace},
url = {https://huggingface.co/dolly-vn/viterbox}
}
Base model
ResembleAI/chatterbox