CowardDriver commited on
Commit
7cdd294
·
verified ·
1 Parent(s): a190877

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +132 -0
README.md ADDED
@@ -0,0 +1,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ license_name: see-source-datasets
4
+ tags:
5
+ - audio
6
+ - tts
7
+ - latents
8
+ - dac-vae
9
+ - speech
10
+ size_categories:
11
+ - 100K<n<1M
12
+ language:
13
+ - en
14
+ ---
15
+
16
+ # EnvTTS Phase 1 — Pre-encoded DAC-VAE Latents
17
+
18
+ Pre-encoded audio latents for Phase 1 training of **EnvAudioEdit** (Small ~195 M CFM-DiT TTS model).
19
+ Audio from three English speech datasets is encoded offline with DAC-VAE (48 kHz, hop=1920),
20
+ saving GPU time during training by avoiding on-the-fly encoding.
21
+
22
+ ---
23
+
24
+ ## Contents
25
+
26
+ ```
27
+ latents.zip
28
+ └── latents/
29
+ ├── cv/ # 180 000 files (humanify/common_voice_english, 10%)
30
+ ├── ps/ # 216 000 files (humanify/ps, 10%)
31
+ └── ht2/ # 313 000 files (humanify/ht2_44khz, 10%)
32
+ ```
33
+
34
+ **Total: 709 000 `.pt` files, ~43 GB (zipped)**
35
+
36
+ ---
37
+
38
+ ## File Format
39
+
40
+ Each `.pt` file is a PyTorch tensor dict:
41
+
42
+ ```python
43
+ {
44
+ "z": Tensor[T, 128], # DAC-VAE latent, float16
45
+ "text": str, # transcript
46
+ "length": int, # = T (number of latent frames)
47
+ }
48
+ ```
49
+
50
+ | Field | Details |
51
+ |---|---|
52
+ | Audio codec | DAC-VAE (`matbee/sam-audio-small-onnx`) |
53
+ | Sample rate | 48 000 Hz |
54
+ | Hop length | 1 920 samples/frame |
55
+ | Latent dim | 128 |
56
+ | Max frames | 500 (≈ 20 s) — longer clips truncated |
57
+ | dtype | float16 |
58
+
59
+ Time ↔ frame conversion: `seconds = frames × 1920 / 48000`
60
+
61
+ ---
62
+
63
+ ## Source Datasets
64
+
65
+ | Subdir | Source | Size used |
66
+ |---|---|---|
67
+ | `cv` | [humanify/common_voice_english](https://huggingface.co/datasets/humanify/common_voice_english) | 10 % ≈ 180 K |
68
+ | `ps` | [humanify/ps](https://huggingface.co/datasets/humanify/ps) | 10 % ≈ 216 K |
69
+ | `ht2` | [humanify/ht2_44khz](https://huggingface.co/datasets/humanify/ht2_44khz) | 10 % ≈ 313 K |
70
+
71
+ > Original audio is licensed under the respective source dataset licenses.
72
+ > This dataset distributes only derived latent representations.
73
+
74
+ ---
75
+
76
+ ## Usage
77
+
78
+ ### Extract
79
+
80
+ ```bash
81
+ unzip latents.zip -d data/
82
+ # → data/latents/cv/, data/latents/ps/, data/latents/ht2/
83
+ ```
84
+
85
+ ### Load a single sample
86
+
87
+ ```python
88
+ import torch
89
+
90
+ sample = torch.load("data/latents/cv/000000049.pt", weights_only=False)
91
+ z = sample["z"] # Tensor[T, 128], float16
92
+ text = sample["text"] # str
93
+ length = sample["length"] # int == z.shape[0]
94
+ ```
95
+
96
+ ### Use in EnvAudioEdit training (local latents mode)
97
+
98
+ Set `use_local_latents: true` in your training config and point `latent_dir` at the extracted directories:
99
+
100
+ ```yaml
101
+ # configs/train_small_phase1.yaml
102
+ use_local_latents: true
103
+ latent_dir:
104
+ - "data/latents/cv"
105
+ - "data/latents/ps"
106
+ - "data/latents/ht2"
107
+ ```
108
+
109
+ Then launch training:
110
+
111
+ ```bash
112
+ accelerate launch scripts/train_phase1.py --config configs/train_small_phase1.yaml
113
+ ```
114
+
115
+ ---
116
+
117
+ ## Encoding Environment
118
+
119
+ | Package | Version |
120
+ |---|---|
121
+ | onnxruntime-gpu | 1.23.2 |
122
+ | nvidia-cudnn-cu12 | 9.5.1.17 |
123
+ | torch | 2.11.0+cu130 |
124
+
125
+ > cuDNN 9.20 has a Conv1D bug; 8.x breaks PyTorch — pin to 9.5.1.17.
126
+
127
+ ---
128
+
129
+ ## Related
130
+
131
+ - Model checkpoints: [`<your-username>/envtts-small-phase1`](https://huggingface.co/<your-username>/envtts-small-phase1)
132
+ - Architecture & training plan: see the model repo README.