Muraddshi commited on
Commit
a583dd2
·
verified ·
1 Parent(s): 9fca65d

Create Readme.md

Browse files
Files changed (1) hide show
  1. Readme.md +85 -0
Readme.md ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Cloudflare Speech Dataset (R2) — Load-time Augmentations
2
+
3
+ Downloads zipped speech data from Cloudflare R2 and yields audio samples via HuggingFace `datasets`.
4
+ Augmentations are applied **on-the-fly at load time** (not pre-saved).
5
+
6
+ ## Requirements
7
+
8
+ - datasets
9
+ - s3fs
10
+ - librosa
11
+ - pydub
12
+ - audiomentations
13
+ - ffmpeg (recommended)
14
+
15
+ ## R2 Credentials
16
+
17
+ ```bash
18
+ export R2_ACCOUNT_ID="..."
19
+ export R2_ACCESS_KEY_ID="..."
20
+ export R2_SECRET_ACCESS_KEY="..."
21
+ ```
22
+
23
+ ## Basic Usage
24
+
25
+ ```python
26
+ from datasets import load_dataset
27
+
28
+ ds = load_dataset(
29
+ "aai-labs/cloudflare-speech-dataset-augmented",
30
+ name="liepa2",
31
+ trust_remote_code=True,
32
+ )
33
+ ```
34
+
35
+ ## Enable Augmentations
36
+
37
+ **Parameters:**
38
+ - `aug_enable=True`
39
+ - `apply_augmentations`: `train` | `validation` | `test` | `none`
40
+ - `noise`, `reverb`, `channel`, `bitcrush`: probabilities ("25", "25%", or 0.25)
41
+ - Probabilities must sum ≤ 1.0
42
+ - Max one augmentation per sample
43
+ - Deterministic per-sample via `aug_seed`
44
+
45
+ ```python
46
+ ds = load_dataset(
47
+ "aai-labs/cloudflare-speech-dataset-augmented",
48
+ name="liepa2",
49
+ trust_remote_code=True,
50
+ aug_enable=True,
51
+ apply_augmentations="train",
52
+ noise="25",
53
+ reverb="25",
54
+ channel="25",
55
+ bitcrush="25",
56
+ aug_seed=42,
57
+ )
58
+ ```
59
+
60
+ ## Intensity Controls
61
+
62
+ **Noise (SNR, lower = stronger):**
63
+ - `min_snr_db=18`, `max_snr_db=30`
64
+
65
+ **Channel (band-limiting):**
66
+ - `hp_min_cutoff=150`, `hp_max_cutoff=400`
67
+ - `lp_min_cutoff=2000`, `lp_max_cutoff=3200`
68
+
69
+ **Bitcrush:**
70
+ - `min_bit_depth=6`, `max_bit_depth=10`
71
+
72
+ ## Augmentation Assets
73
+
74
+ Defaults (downloaded & cached on first use):
75
+ - `noise_prefix="asr-training-data/augmentation/noise"`
76
+ - `ir_prefix="asr-training-data/augmentation/ir"`
77
+
78
+ ## Notes
79
+
80
+ - Keep validation/test clean (`apply_augmentations="train"`)
81
+ - Saving is optional; on-the-fly is fine
82
+ - To precompute:
83
+ ```python
84
+ ds["train"].save_to_disk("/path/train_aug_v1")
85
+ ```