ViInstruct / README.md
thangquang09's picture
Release ViInstruct v1: annotation layer, README and license
d99ffd8 verified
|
Raw History Blame Contribute Delete
10.9 kB
---
pretty_name: ViInstruct
language:
- vi
license: other
license_name: viinstruct-noncommercial
license_link: LICENSE.md
task_categories:
- text-to-speech
tags:
- instruction-based-tts
- controllable-tts
- speech-style-captioning
- vietnamese
- accent
- prosody
size_categories:
- 1M<n<10M
configs:
- config_name: default
data_files:
- split: train
path: data/train.csv
- split: validation
path: data/validation.csv
- split: test
path: data/test.csv
---
# ViInstruct
ViInstruct is a large-scale Vietnamese dataset for **instruction-based text-to-speech (TTS)**. Each utterance is paired with one free-form Vietnamese instruction that describes how it is spoken: speaker gender, age group and regional accent, plus speaking rate, pitch, loudness, expressiveness and (for the emotion subset) emotion.
- **1,224,945** utterance–instruction pairs, about **1,718 hours** of speech
- **6** source corpora covering **3** tasks: general speech, regional accent, emotion
- Instructions written by an LLM (Qwen3.5-122B-A10B) from acoustic and speaker attributes, average **22.1 words**
- Paper: *ViInstruct: A Large-Scale Vietnamese Dataset for Instruction-Based Text-to-Speech Synthesis*, APSIPA ASC 2026
- Demo with audio samples: https://thangquang09.github.io/viinstruct-demo/
> **This repository is an annotation layer, not an audio corpus.** It holds the instructions, attribute labels, transcripts and split definitions, keyed to the identifiers of the source corpora. Get the audio from each original corpus (see [Source corpora](#source-corpora)) and join on `dataset` + `source_id` / `audio_path`.
## Example
| Field | Value |
|---|---|
| `caption_full` | Giọng nữ trưởng thành miền Nam, nói nhanh, to, giọng cao và đều đều. |
| English gloss | *Adult female voice from the South, fast, loud, high-pitched and monotone.* |
| `kw_gender` / `kw_age` / `region` | nữ / người trưởng thành / south |
| `kw_speaking_rate` / `kw_pitch` / `kw_loudness_lufs` / `kw_pitch_cv` | nhanh / cao / to / đều đều |
```python
from datasets import load_dataset
ds = load_dataset("thangquang09/ViInstruct")
print(ds["train"][0]["caption_full"])
```
## Dataset structure
### Splits
| Source | Task | Train | Validation | Test | Total |
|---|---|---:|---:|---:|---:|
| Vivoice | general | 523,169 | 29,065 | 29,065 | 581,299 |
| Dolly | general | 526,067 | 29,210 | 29,232 | 584,509 |
| ViMD | accent | 10,087 | 1,293 | 1,410 | 12,790 |
| LSVSC | accent | 37,181 | 3,800 | 3,008 | 43,989 |
| VNEMOS | emotion | 189 | 11 | 11 | 211 |
| ViSEC | emotion | 1,932 | 107 | 108 | 2,147 |
| **Total** | | **1,098,625** | **63,486** | **62,834** | **1,224,945** |
ViMD and LSVSC keep their official splits. Dolly is split speaker-disjointly by `voice_id`. Vivoice, VNEMOS and ViSEC have no official split or stable speaker id, so they use a stratified 90/5/5 split at the sample level.
### Fields
All descriptor fields hold the Vietnamese keyword that was given to the LLM. An empty string means the attribute does not apply (for example `kw_emotion` outside the emotion subset).
| Column | Description | Values |
|---|---|---|
| `id` | Unique id, `{dataset}_{source_id}` | |
| `source_id` | Utterance id in the source corpus | |
| `dataset` | Source corpus | `vivoice`, `dolly`, `vimd`, `lsvsc`, `vnemos`, `visec` |
| `task` | Subset | `general`, `accent`, `emotion` |
| `split` | Split | `train`, `val`, `test` |
| `transcript` | Text of the utterance | |
| `caption_full` | The natural-language instruction | |
| `kw_gender` | Gender | `nam` (male), `nữ` (female) |
| `kw_age` | Age group | `trẻ em` (child), `thanh thiếu niên` (teen), `người trưởng thành` (adult), `cao tuổi` (senior) |
| `kw_accent` | Regional accent | `giọng miền Bắc` / `giọng miền Trung` / `giọng miền Nam` |
| `kw_accent_province` | Province (ViMD only, 63 provinces) | |
| `region` | Machine-readable accent region | `north`, `central`, `south` |
| `kw_speaking_rate` | Speaking rate, 7 levels | `rất chậm`, `chậm`, `hơi chậm`, `vừa phải`, `hơi nhanh`, `nhanh`, `rất nhanh` |
| `kw_pitch` | Mean pitch, 7 levels (binned per gender–accent group) | `rất trầm`, `trầm`, `hơi trầm`, `trung bình`, `hơi cao`, `cao`, `rất cao` |
| `kw_loudness_lufs` | Loudness, 5 levels | `rất nhỏ`, `nhỏ`, `vừa`, `to`, `rất to` |
| `kw_pitch_cv` | Pitch variation (expressiveness), 5 levels | `đều đều`, `ít biểu cảm`, `biểu cảm vừa phải`, `sinh động`, `rất biểu cảm` |
| `kw_emotion` | Emotion (emotion subset only) | `trung lập` (neutral), `vui vẻ` (happiness), `buồn bã` (sadness), `tức giận` (anger), `sợ hãi` (fear) |
| `audio_path` | Path of the audio file relative to the root of its source corpus | |
### Attribute distribution
- Gender: 53.8% male, 46.2% female
- Age: 96.6% adult, 1.8% children, 1.1% teens, 0.4% seniors
- Accent: 59.6% North, 23.9% Central, 16.5% South
- Emotion (2,358 clips): anger, fear, happiness, neutral, sadness. Fear comes only from VNEMOS, whose *anxiety* class is mapped to fear.
- Median duration 4.31 s; mean pitch about 137 Hz (male) and 231 Hz (female); speaking rate about 4.57 syllables/s; loudness about −21.4 LUFS.
## Source corpora
| Corpus | Task | Content | Kept clips | Kept hours | Upstream license |
|---|---|---|---:|---:|---|
| [viVoice](https://hf.co/datasets/capleaf/viVoice) | general | read and spontaneous speech from public video channels | 581,299 | 779 | CC BY-NC-SA 4.0 (gated) |
| [Dolly-Audio](https://hf.co/datasets/dolly-vn/dolly-audio-1000h-vietnamese) | general | TTS-synthesized speech, 484 voice presets | 584,509 | 808 | CC BY-NC-SA 4.0 (gated) |
| ViMD (Dinh et al., EMNLP 2024) | accent | read speech, 63 provinces | 12,790 | 54 | CC BY-NC-ND 4.0 |
| LSVSC (Tran et al., Electronics 2024) | accent | read speech with gender / age / region labels | 43,989 | 75 | no license published |
| VNEMOS (Quang Anh et al., ICDV 2024) | emotion | film and TV recordings | 211 | 0.35 | no license published |
| ViSEC (Thanh et al., ICASSP 2024) | emotion | acted speech from public video | 2,147 | 1.12 | CC BY 4.0 |
1,583,772 raw clips (2,223 h) were reduced to 1,224,945 (1,718 h) by quality filtering and deduplication. Dolly is synthetic and makes up 47.7% of the pairs.
## How the dataset was built
1. **Acoustic features and quality filtering.** Duration, speaking rate (syllables per second from the transcript), pitch statistics with CREPE, loudness in LUFS, and speech proportion with Silero VAD. Clips are kept when duration ≥ 2.0 s (≥ 1.0 s for ViSEC), SNR ≥ 15 dB, clipping ratio < 0.01 and speech proportion ≥ 0.30.
2. **Speaker attributes.** Ground-truth labels are kept whenever the source corpus provides them. Otherwise a wav2vec2 gender classifier, a ViMD-trained wav2vec2 accent classifier (94.6% macro-F1) and a fine-tuned MERaLiON age classifier (teens / adults / seniors) predict them. ViMD transcripts come from PhoWhisper.
3. **Quantile binning.** Continuous features become Vietnamese keywords with quantile bins: 7 levels for pitch and speaking rate, 5 for loudness and pitch variation. Pitch is binned per gender–accent group. Bin edges are computed on Vivoice and reused for the other corpora.
4. **Instruction generation.** Qwen3.5-122B-A10B writes one instruction per utterance from the transcript, the shuffled attribute tags and three few-shot examples. Synonym substitution, random attribute order, varied few-shot examples and a per-utterance temperature in [0.3, 0.7] increase lexical variety.
### Instruction quality audit
All 1,224,945 instructions were matched against their own tags with a Vietnamese descriptor lexicon (text only, no listening):
- 81.4% of instructions realize every tag in words; the rest paraphrase outside the lexicon.
- When a slot is realized, it names the conditioning level at least 96.6% of the time (loudness is the lowest; gender and accent are ≥ 99.99%).
- 99.7% of disagreements are one bin apart.
- No emotion word appears in the 1,222,587 instructions without an emotion tag.
- Known defect: 4.7% of instructions render *người trưởng thành* (adult) as *lớn tuổi* (elderly).
This audit checks tag → text only. Whether the tags match the audio rests on the ground-truth labels and the classifiers above.
## Benchmark
The paper adapts two baselines to Vietnamese (Parler-TTS and CapSpeech NAR, both with a frozen ViT5-large instruction encoder) and evaluates them on a general full-tag set (1,228 clips) and an accent set (1,710 clips).
| Metric | Reference audio | Parler-TTS | CapSpeech NAR |
|---|---:|---:|---:|
| CER (%) ↓ | 0.96 | 3.19 | 0.85 |
| WER (%) ↓ | 2.15 | 4.80 | 1.55 |
| UTMOSv2 ↑ | 2.95 | 2.54 | 2.65 |
| Gender macro-F1 (%) ↑ | | 84.83 | 100.00 |
| Age macro-F1 (%) ↑ | | 49.94 | 52.82 |
| Accent macro-F1, general set (%) ↑ | | 48.56 | 77.48 |
| Accent macro-F1, accent set (%) ↑ | | 38.82 | 72.37 |
| Acoustic bin accuracy (%) ↑ | | 36.46 | 66.55 |
Chance level is about 33% macro-F1 for the three-way age and accent tasks and 14–20% for bin accuracy.
## Limitations
- Age labels are heavily adult and partly come from a coarse three-class classifier; age adherence of both baselines is close to chance.
- The emotion subset is small (2,358 clips, 1.5 h) and has no reliable automatic metric.
- The accent subset is regionally imbalanced toward Northern speech.
- Pitch is summarized by scalar statistics that do not separate lexical tone from paralinguistic prosody.
- Nearly half of the pairs come from synthesized speech (Dolly).
- Predicted attributes and the benchmark are automatic. No human listening study has been done yet.
## License
The annotation layer (instructions, attribute labels and splits) is released for **non-commercial research use only**. Each subset also remains governed by the terms of its source corpus, listed in [Source corpora](#source-corpora). The upstream terms are mutually incompatible or unstated, so this repository does not redistribute any audio. See [LICENSE.md](LICENSE.md).
## Ethics
No new speech was recorded and no attempt was made to identify speakers. Where ground-truth labels are absent, gender, age and accent are model predictions, not self-reported identity, and should not be read as factual claims about individuals. The instructions inherit that uncertainty.
## Citation
```bibtex
@inproceedings{ly2026viinstruct,
title = {{ViInstruct}: A Large-Scale {Vietnamese} Dataset for Instruction-Based Text-to-Speech Synthesis},
author = {Ly, Thang and Do, Tri-Nhan and Nguyen, Tu-Anh and Mac, Dang-Khoa},
booktitle = {Proc. Asia-Pacific Signal and Information Processing Association Annual Summit and Conference (APSIPA ASC)},
year = {2026}
}
```
Please also cite the source corpora you use.