File size: 3,097 Bytes
7cdd294
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
---
license: other
license_name: see-source-datasets
tags:
- audio
- tts
- latents
- dac-vae
- speech
size_categories:
- 100K<n<1M
language:
- en
---

# EnvTTS Phase 1 — Pre-encoded DAC-VAE Latents

Pre-encoded audio latents for Phase 1 training of **EnvAudioEdit** (Small ~195 M CFM-DiT TTS model).
Audio from three English speech datasets is encoded offline with DAC-VAE (48 kHz, hop=1920),
saving GPU time during training by avoiding on-the-fly encoding.

---

## Contents

```
latents.zip
└── latents/
    ├── cv/     # 180 000 files  (humanify/common_voice_english, 10%)
    ├── ps/     # 216 000 files  (humanify/ps, 10%)
    └── ht2/    # 313 000 files  (humanify/ht2_44khz, 10%)
```

**Total: 709 000 `.pt` files, ~43 GB (zipped)**

---

## File Format

Each `.pt` file is a PyTorch tensor dict:

```python
{
    "z":      Tensor[T, 128],   # DAC-VAE latent, float16
    "text":   str,              # transcript
    "length": int,              # = T (number of latent frames)
}
```

| Field | Details |
|---|---|
| Audio codec | DAC-VAE (`matbee/sam-audio-small-onnx`) |
| Sample rate | 48 000 Hz |
| Hop length | 1 920 samples/frame |
| Latent dim | 128 |
| Max frames | 500 (≈ 20 s) — longer clips truncated |
| dtype | float16 |

Time ↔ frame conversion: `seconds = frames × 1920 / 48000`

---

## Source Datasets

| Subdir | Source | Size used |
|---|---|---|
| `cv` | [humanify/common_voice_english](https://huggingface.co/datasets/humanify/common_voice_english) | 10 % ≈ 180 K |
| `ps` | [humanify/ps](https://huggingface.co/datasets/humanify/ps) | 10 % ≈ 216 K |
| `ht2` | [humanify/ht2_44khz](https://huggingface.co/datasets/humanify/ht2_44khz) | 10 % ≈ 313 K |

> Original audio is licensed under the respective source dataset licenses.
> This dataset distributes only derived latent representations.

---

## Usage

### Extract

```bash
unzip latents.zip -d data/
# → data/latents/cv/, data/latents/ps/, data/latents/ht2/
```

### Load a single sample

```python
import torch

sample = torch.load("data/latents/cv/000000049.pt", weights_only=False)
z      = sample["z"]       # Tensor[T, 128], float16
text   = sample["text"]    # str
length = sample["length"]  # int == z.shape[0]
```

### Use in EnvAudioEdit training (local latents mode)

Set `use_local_latents: true` in your training config and point `latent_dir` at the extracted directories:

```yaml
# configs/train_small_phase1.yaml
use_local_latents: true
latent_dir:
  - "data/latents/cv"
  - "data/latents/ps"
  - "data/latents/ht2"
```

Then launch training:

```bash
accelerate launch scripts/train_phase1.py --config configs/train_small_phase1.yaml
```

---

## Encoding Environment

| Package | Version |
|---|---|
| onnxruntime-gpu | 1.23.2 |
| nvidia-cudnn-cu12 | 9.5.1.17 |
| torch | 2.11.0+cu130 |

> cuDNN 9.20 has a Conv1D bug; 8.x breaks PyTorch — pin to 9.5.1.17.

---

## Related

- Model checkpoints: [`<your-username>/envtts-small-phase1`](https://huggingface.co/<your-username>/envtts-small-phase1)
- Architecture & training plan: see the model repo README.