matcha-tts-datasets / README.md
Cong123779's picture
Upload dataset
e45b66b verified
|
Raw History Blame Contribute Delete
17.1 kB
metadata
license: apache-2.0
task_categories:
  - text-to-speech
language:
  - vi
  - en
tags:
  - speech
  - tts
  - matcha-tts
  - vocos
  - voice-cloning
  - vietnamese-tts
  - english-tts
  - audiobook
  - ecapa-tdnn
  - squim
  - zero-noise
size_categories:
  - 100K<n<1M
dataset_info:
  - config_name: en_kokoro_50h
    features:
      - name: audio
        dtype:
          audio:
            sampling_rate: 22050
      - name: id
        dtype: string
      - name: text
        dtype: string
      - name: ipa
        dtype: string
      - name: duration
        dtype: float32
    splits:
      - name: train
        num_bytes: 3951793919
        num_examples: 62139
      - name: validation
        num_bytes: 204565108
        num_examples: 3270
    download_size: 4154936803
    dataset_size: 4156359027
  - config_name: en_kokoro_50h_af_bella
    features:
      - name: audio
        dtype:
          audio:
            sampling_rate: 22050
      - name: id
        dtype: string
      - name: text
        dtype: string
      - name: ipa
        dtype: string
      - name: duration
        dtype: float32
    splits:
      - name: train
        num_bytes: 3682697692.4
        num_examples: 44300
      - name: validation
        num_bytes: 103905975
        num_examples: 1000
    download_size: 3748130570
    dataset_size: 3786603667.4
  - config_name: en_kokoro_50h_af_heart_nicole
    features:
      - name: audio
        dtype:
          audio:
            sampling_rate: 22050
      - name: id
        dtype: string
      - name: text
        dtype: string
      - name: ipa
        dtype: string
      - name: duration
        dtype: float32
    splits:
      - name: train
        num_bytes: 3546481792.416
        num_examples: 40438
      - name: validation
        num_bytes: 111384183
        num_examples: 1000
    download_size: 3618862639
    dataset_size: 3657865975.416
  - config_name: en_kokoro_50h_af_mix_story
    features:
      - name: audio
        dtype:
          audio:
            sampling_rate: 22050
      - name: id
        dtype: string
      - name: text
        dtype: string
      - name: ipa
        dtype: string
      - name: duration
        dtype: float32
    splits:
      - name: train
        num_bytes: 3671664207.98
        num_examples: 44677
      - name: validation
        num_bytes: 102008681
        num_examples: 1000
    download_size: 3732177996
    dataset_size: 3773672888.98
  - config_name: en_kokoro_50h_af_nicole
    features:
      - name: audio
        dtype:
          audio:
            sampling_rate: 22050
      - name: id
        dtype: string
      - name: text
        dtype: string
      - name: ipa
        dtype: string
      - name: duration
        dtype: float32
    splits:
      - name: train
        num_bytes: 3400955365.7
        num_examples: 31975
      - name: validation
        num_bytes: 133714065
        num_examples: 1000
    download_size: 3501327806
    dataset_size: 3534669430.7
  - config_name: en_kokoro_50h_af_sarah
    features:
      - name: audio
        dtype:
          audio:
            sampling_rate: 22050
      - name: id
        dtype: string
      - name: text
        dtype: string
      - name: ipa
        dtype: string
      - name: duration
        dtype: float32
    splits:
      - name: train
        num_bytes: 3573266160.96
        num_examples: 44782
      - name: validation
        num_bytes: 102258112
        num_examples: 1000
    download_size: 3635043191
    dataset_size: 3675524272.96
  - config_name: en_kokoro_50h_am_adam
    features:
      - name: audio
        dtype:
          audio:
            sampling_rate: 22050
      - name: id
        dtype: string
      - name: text
        dtype: string
      - name: ipa
        dtype: string
      - name: duration
        dtype: float32
    splits:
      - name: train
        num_bytes: 3393912619.768
        num_examples: 43908
      - name: validation
        num_bytes: 96524642
        num_examples: 1000
    download_size: 3448053011
    dataset_size: 3490437261.768
  - config_name: en_kokoro_50h_am_michael
    features:
      - name: audio
        dtype:
          audio:
            sampling_rate: 22050
      - name: id
        dtype: string
      - name: text
        dtype: string
      - name: ipa
        dtype: string
      - name: duration
        dtype: float32
    splits:
      - name: train
        num_bytes: 3525124747.76
        num_examples: 40205
      - name: validation
        num_bytes: 109274028
        num_examples: 1000
    download_size: 3593942500
    dataset_size: 3634398775.76
  - config_name: en_kokoro_50h_am_michael_soft
    features:
      - name: audio
        dtype:
          audio:
            sampling_rate: 22050
      - name: id
        dtype: string
      - name: text
        dtype: string
      - name: ipa
        dtype: string
      - name: duration
        dtype: float32
    splits:
      - name: train
        num_bytes: 3503373256.54
        num_examples: 37705
      - name: validation
        num_bytes: 115416751
        num_examples: 1000
    download_size: 3577125143
    dataset_size: 3618790007.54
  - config_name: en_kokoro_50h_am_mix_podcast
    features:
      - name: audio
        dtype:
          audio:
            sampling_rate: 22050
      - name: id
        dtype: string
      - name: text
        dtype: string
      - name: ipa
        dtype: string
      - name: duration
        dtype: float32
    splits:
      - name: train
        num_bytes: 3434640875.332
        num_examples: 42317
      - name: validation
        num_bytes: 101476736
        num_examples: 1000
    download_size: 3495161108
    dataset_size: 3536117611.332
  - config_name: en_kokoro_50h_am_onyx
    features:
      - name: audio
        dtype:
          audio:
            sampling_rate: 22050
      - name: id
        dtype: string
      - name: text
        dtype: string
      - name: ipa
        dtype: string
      - name: duration
        dtype: float32
    splits:
      - name: train
        num_bytes: 2941102047.912
        num_examples: 43323
      - name: validation
        num_bytes: 83483484
        num_examples: 1000
    download_size: 2990949807
    dataset_size: 3024585531.912
  - config_name: en_kokoro_50h_bf_emma
    features:
      - name: audio
        dtype:
          audio:
            sampling_rate: 22050
      - name: id
        dtype: string
      - name: text
        dtype: string
      - name: ipa
        dtype: string
      - name: duration
        dtype: float32
    splits:
      - name: train
        num_bytes: 3885963859.808
        num_examples: 44456
      - name: validation
        num_bytes: 106711556
        num_examples: 1000
    download_size: 3946945835
    dataset_size: 3992675415.808
  - config_name: en_kokoro_50h_bf_mix_elegance
    features:
      - name: audio
        dtype:
          audio:
            sampling_rate: 22050
      - name: id
        dtype: string
      - name: text
        dtype: string
      - name: ipa
        dtype: string
      - name: duration
        dtype: float32
    splits:
      - name: train
        num_bytes: 3818499993.952
        num_examples: 43459
      - name: validation
        num_bytes: 110030509
        num_examples: 1000
    download_size: 3881532987
    dataset_size: 3928530502.952
configs:
  - config_name: en_kokoro_50h
    data_files:
      - split: train
        path: en_kokoro_50h/train-*
      - split: validation
        path: en_kokoro_50h/validation-*
  - config_name: en_kokoro_50h_af_bella
    data_files:
      - split: train
        path: en_kokoro_50h_af_bella/train-*
      - split: validation
        path: en_kokoro_50h_af_bella/validation-*
  - config_name: en_kokoro_50h_af_heart_nicole
    data_files:
      - split: train
        path: en_kokoro_50h_af_heart_nicole/train-*
      - split: validation
        path: en_kokoro_50h_af_heart_nicole/validation-*
  - config_name: en_kokoro_50h_af_mix_story
    data_files:
      - split: train
        path: en_kokoro_50h_af_mix_story/train-*
      - split: validation
        path: en_kokoro_50h_af_mix_story/validation-*
  - config_name: en_kokoro_50h_af_nicole
    data_files:
      - split: train
        path: en_kokoro_50h_af_nicole/train-*
      - split: validation
        path: en_kokoro_50h_af_nicole/validation-*
  - config_name: en_kokoro_50h_af_sarah
    data_files:
      - split: train
        path: en_kokoro_50h_af_sarah/train-*
      - split: validation
        path: en_kokoro_50h_af_sarah/validation-*
  - config_name: en_kokoro_50h_am_adam
    data_files:
      - split: train
        path: en_kokoro_50h_am_adam/train-*
      - split: validation
        path: en_kokoro_50h_am_adam/validation-*
  - config_name: en_kokoro_50h_am_michael
    data_files:
      - split: train
        path: en_kokoro_50h_am_michael/train-*
      - split: validation
        path: en_kokoro_50h_am_michael/validation-*
  - config_name: en_kokoro_50h_am_michael_soft
    data_files:
      - split: train
        path: en_kokoro_50h_am_michael_soft/train-*
      - split: validation
        path: en_kokoro_50h_am_michael_soft/validation-*
  - config_name: en_kokoro_50h_am_mix_podcast
    data_files:
      - split: train
        path: en_kokoro_50h_am_mix_podcast/train-*
      - split: validation
        path: en_kokoro_50h_am_mix_podcast/validation-*
  - config_name: en_kokoro_50h_am_onyx
    data_files:
      - split: train
        path: en_kokoro_50h_am_onyx/train-*
      - split: validation
        path: en_kokoro_50h_am_onyx/validation-*
  - config_name: en_kokoro_50h_bf_emma
    data_files:
      - split: train
        path: en_kokoro_50h_bf_emma/train-*
      - split: validation
        path: en_kokoro_50h_bf_emma/validation-*
  - config_name: en_kokoro_50h_bf_mix_elegance
    data_files:
      - split: train
        path: en_kokoro_50h_bf_mix_elegance/train-*
      - split: validation
        path: en_kokoro_50h_bf_mix_elegance/validation-*

🎙️ Matcha-TTS Multilingual Master Speech & Acoustic Datasets

Kho dữ liệu âm thanh đa ngôn ngữ (Tiếng Việt & Tiếng Anh) chuẩn phòng thu SOTA, được tiền xử lý và thẩm định toàn diện (SQUIM noise assessment, trích xuất vector âm sắc ECAPA-TDNN 192-d, căn chỉnh phụ đề JSON/timestamps, Mel-spectrogram & F0 pitch contours) phục vụ tối ưu cho việc huấn luyện và suy luận mô hình Matcha-TTS kết hợp Vocoder Vocos.


📌 I. Tổng Quan Các Bộ Dữ Liệu Trên Hugging Face

Toàn bộ dữ liệu âm thanh lớn được đóng gói thành các Shard tiêu chuẩn 2.5 GB – 3.0 GB (.tar.gz) để tối ưu hoá băng thông, tránh lỗi timeout và tương thích hoàn hảo với giới hạn Git LFS của Hugging Face.

matcha-tts-multilingual-datasets/
├── README.md                                  # Hướng dẫn chi tiết & đặc tính kỹ thuật
├── MASTER_DATASET_INVENTORY.md                # Bảng kiểm kê 1,363,144 mẫu chi tiết
├── speaker_centroids/                         # 36 Vector trọng tâm âm sắc (.npy) & manifest
│   ├── centroids_manifest.json
│   ├── vieneu_spk_01_centroid.npy ... vieneu_spk_23_centroid.npy
│   ├── english_master_centroid.npy, mtet_english_centroid.npy ...
│   └── tghm_mc_centroid.npy, vldp_mc_tran_van_centroid.npy
├── vieneu_generated/                          # 53,218 mẫu âm thanh Vieneu AI (~46GB)
│   ├── manifest.jsonl, summary_report.json, squim_noise_quality_assessment.csv
│   ├── ecapa_embeddings.tar.gz, json_timestamps.tar.gz, srt_subtitles.tar.gz
│   └── wavs_shard_0001.tar.gz ... wavs_shard_0016.tar.gz (mỗi shard ~2.5 - 3GB)
├── english_270h/                              # 270 Giờ Audiobook Tiếng Anh (~65GB)
│   ├── manifest.jsonl, squim_noise_quality_assessment.csv
│   ├── f0.tar.gz, ecapa_embeddings.tar.gz
│   ├── mels_shard_0001.tar.gz ... (Mel-spectrograms 80-bin)
│   └── wavs_part_1_shard_xxxx.tar.gz ... (WAV audio theo từng bộ)
├── the_gioi_hoan_my/                          # Audiobook Tiên Hiệp 44.1kHz (~114GB)
│   ├── squim_noise_quality_assessment.csv, ecapa_embeddings.tar.gz
│   ├── canonical_aligned_chapters_dataset.tar.gz, the_gioi_hoan_my_text_dataset.tar.gz
│   └── audio_44100hz_shard_xxxx.tar.gz (88 tập audio siêu dài 4-5 tiếng)
├── vietphrase_vietspeech/                     # 956,826 câu Tiếng Việt Đa Giọng (~124GB)
│   ├── metadata_pristine_studio_25db.csv, metadata.csv, squim_noise_quality_assessment.csv
│   ├── acoustic_features_report.jsonl, ecapa_embeddings.tar.gz, speaker_embeddings.tar.gz
│   └── wavs_16k_shard_xxxx.tar.gz (WAV audio 16kHz chia nhỏ 2.5GB/shard)
└── mtet_english/                              # 294,690 câu Tiếng Anh AI Studio (~149GB)
    ├── metadata.jsonl, squim_noise_quality_assessment.csv
    ├── ecapa_embeddings.tar.gz, json.tar.gz
    └── audio_shard_xxxx.tar.gz (WAV audio studio phòng thu tĩnh 100%)

🎛️ II. Chi Tiết Kỹ Thuật Từng Bộ Dữ Liệu

1. speaker_centroids/ (Trọng Tâm Âm Sắc Cho Voice Cloning)

  • Số lượng: 36 vector đặc trưng âm sắc cho tất cả các giọng nói.
  • Định dạng: .npy (NumPy Array), Shape (192,), Dtype float32, chuẩn hoá $L_2$-norm = 1.0.
  • Cách dùng: Nạp trực tiếp vào mô hình Matcha-TTS để định hình âm sắc người nói mà không cần chạy lại mô hình trích xuất âm sắc.

2. vieneu_generated/ (53,218 mẫu giọng Vieneu AI)

  • Dung lượng: ~46.27 GB (gồm 16 shard audio).
  • Đặc tính: File âm thanh 22,050Hz kèm phụ đề SRT, JSON timestamp từng từ, nhãn điểm độ ồn SQUIM.

3. english_270h/ (270 Giờ Audiobook Tiếng Anh)

  • Dung lượng: ~65.41 GB.
  • Thành phần:
    • Audio WAV gốc chia theo 3 phần: Part 1 - Mortal Journey (100h), Part 2 - Shadow Slave (100h), Part 3 - My Dungeon Life (70h).
    • mels/: Mel-spectrogram 80 băng tần trích xuất sẵn (~24 GB).
    • f0/: Đường cong cao độ F0 trích xuất sẵn (~640 MB).
    • manifest.jsonl: Chỉ mục toàn bộ văn bản và đường dẫn file tương ứng.

4. the_gioi_hoan_my/ (Bộ Truyện Tiên Hiệp Dài 44.1kHz)

  • Dung lượng: ~113.74 GB.
  • Đặc tính: 88 tập audio hoàn chỉnh chất lượng cao 44,100Hz kết hợp bộ văn bản đối soát từng chương canonical_aligned_chapters_dataset.

5. vietphrase_vietspeech/ (956,826 Mẫu Đa Giọng Tiếng Việt)

  • Dung lượng: ~123.82 GB.
  • Điểm nổi bật: Chứa 72,207 mẫu Zero-Noise tuyệt đối ($\text{SI-SDR} \ge 25\text{ dB}$) lọc từ tập dữ liệu lớn thông qua mô hình thẩm định TorchAudio SQUIM.

6. mtet_english/ (294,690 Mẫu Nữ AI Studio Tiếng Anh)

  • Dung lượng: ~149.35 GB.
  • Đặc tính: Giọng đọc tiếng Anh chuẩn phòng thu, $99.5%$ file đạt độ sạch $\ge 28\text{ dB}$ (nền tĩnh tuyệt đối).

🚀 III. Hướng Dẫn Sử Dụng & Khôi Phục Dữ Liệu

Cách 1: Tải & Tự Động Giải Nén Bằng Script Python Sẵn Có (Khuyên Dùng)

Sử dụng script restore_dataset.py có sẵn trong dự án:

# Tải và tự động giải nén riêng 1 bộ (ví dụ vieneu_generated)
python3 scripts/restore_dataset.py --dataset vieneu_generated --output_dir ./datasets_restored

# Tải bộ english_270h
python3 scripts/restore_dataset.py --dataset english_270h --output_dir ./datasets_restored

# Tải toàn bộ tất cả các bộ
python3 scripts/restore_dataset.py --dataset all --output_dir ./datasets_restored

Cách 2: Tải Bằng Thư Viện huggingface_hub Trong Code Python

from huggingface_hub import snapshot_download

# Tải thư mục speaker_centroids (rất nhẹ, ~40 KB)
centroids_dir = snapshot_download(
    repo_id="Cong123779/matcha-tts-multilingual-datasets",
    repo_type="dataset",
    allow_patterns="speaker_centroids/*",
    local_dir="./speaker_centroids"
)

# Tải file manifest & điểm SQUIM của Vieneu
manifest_path = snapshot_download(
    repo_id="Cong123779/matcha-tts-multilingual-datasets",
    repo_type="dataset",
    allow_patterns="vieneu_generated/*.json*",
    local_dir="./vieneu_meta"
)

Cách 3: Nạp Trọng Tâm Âm Sắc Vào Matcha-TTS (Voice Cloning)

import numpy as np
import torch

# 1. Nạp vector trọng tâm âm sắc (192 chiều)
centroid_path = "speaker_centroids/vieneu_spk_01_centroid.npy"
speaker_emb = np.load(centroid_path)  # Shape: (192,)

# 2. Chuyển sang PyTorch Tensor cho Matcha-TTS
spk_tensor = torch.from_numpy(speaker_emb).unsqueeze(0).float()  # Shape: [1, 192]

# 3. Đưa vào hàm sinh âm thanh
# mel_output = model.synthesise(text_tokens, spk=spk_tensor, n_timesteps=10, temperature=0.667)

🎚️ IV. Công Thức Điều Khiển Triệt Tiêu Tạp Âm (Zero-Noise Conditioning)

Các file squim_noise_quality_assessment.csv trong dataset cung cấp điểm $\text{SI-SDR}$ (Signal-to-Distortion Ratio). Để huấn luyện và suy luận mô hình sinh giọng nói tĩnh tuyệt đối:

  1. Công thức chuẩn hóa điểm tạp âm về đoạn $[0.0, 1.0]$: $$\text{Noise_Score} = \text{Clip}\left(\frac{25.0 - \text{SI_SDR}}{30.0}, \quad 0.0, \quad 1.0\right)$$

    • $\text{SI-SDR} \ge 25.0\text{ dB}$ (Chuẩn phòng thu vô thanh): $\mathbf{\text{Noise_Score} = 0.00}$.
    • $\text{SI-SDR} = 15.0\text{ dB}$ (Phòng thu bình thường): $\mathbf{\text{Noise_Score} = 0.33}$.
    • $\text{SI-SDR} \le -5.0\text{ dB}$ (Tạp âm lớn): $\mathbf{\text{Noise_Score} = 1.00}$.
  2. Ứng dụng:

    • Khi Huấn Luyện (Training): Nạp đúng Noise_Score để model học cách phân tách tạp âm khỏi giọng người.
    • Khi Suy Luận (Inference): Luôn gán cố định $\mathbf{\text{Noise_Score} = 0.0}$ $\rightarrow$ Mô hình tự động lọc bỏ tạp âm, sinh giọng trong và tĩnh $100%$.