guapaQAQ commited on
Commit
9a4c6c9
Β·
1 Parent(s): f6e8991

Update README & zip

Browse files
README.md CHANGED
@@ -32,10 +32,14 @@ size_categories:
32
 
33
  # Gametime β€” Basic (Parquet)
34
 
 
 
 
35
  ---
36
 
37
- ## TL;DR β€” Stream and decode
38
 
 
39
  ```python
40
  from datasets import load_dataset
41
  import io, soundfile as sf
@@ -43,36 +47,65 @@ import io, soundfile as sf
43
  ds = load_dataset("gametime-benchmark/gametime", "basic", split="train", streaming=True)
44
 
45
  ex = next(iter(ds))
46
- buf = io.BytesIO(ex["audio_bytes"]) # raw bytes from Parquet
47
- wav, sr = sf.read(buf, dtype="float32") # decodes in-memory
48
  print(ex["id"], sr, len(wav), ex["text"])
49
  ````
50
 
51
- * Works with **streaming=True** (no full download).
52
- * No `torchcodec` required. You only need `soundfile` (libsndfile).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
 
54
  ---
55
 
56
- ## Schema
57
 
58
- Columns in each Parquet row:
59
 
60
- * `id`: unique identifier (e.g., `1-a-Sequence-Number/train/1-a-Sequence-Number-01-01.wav`)
61
- * `category`: `"basic"`
62
- * `dataset`: group name (e.g., `1-a-Sequence-Number`)
63
- * `split`: `train` or `test`
64
- * `template_idx`, `item_idx`: indices if applicable (empty string otherwise)
65
- * `text`: reference text to speak/recognize
66
- * `audio_bytes`: raw WAV bytes
67
- * `audio_format`: `"wav"`
68
- * `sampling_rate`: e.g., `16000`
 
 
 
69
 
70
  ---
71
 
72
- ## Example: quick ASR sanity check (Whisper)
73
 
74
  ```python
75
- # pip install transformers datasets soundfile evaluate
76
  import io
77
  import soundfile as sf
78
  import evaluate
@@ -89,6 +122,7 @@ for i, ex in enumerate(ds):
89
  wav, sr = sf.read(io.BytesIO(ex["audio_bytes"]), dtype="float32")
90
  hyp = asr({"array": wav, "sampling_rate": sr})["text"]
91
  refs.append(ex["text"]); hyps.append(hyp)
 
92
  if i >= 199: # quick 200-sample check
93
  break
94
 
@@ -97,14 +131,15 @@ print("WER:", wer.compute(references=refs, predictions=hyps))
97
 
98
  ---
99
 
100
- ## Notes
101
 
102
- * **Advanced** category (with `<sil="Xms"/>` timing tokens) is planned separately.
103
  * License: **CC BY 4.0** for text, metadata, and audio.
 
104
 
105
  ---
106
 
107
- ## Citation
108
 
109
  ```
110
  @dataset{gametime_basic_2025,
 
32
 
33
  # Gametime β€” Basic (Parquet)
34
 
35
+ The **Basic** split of Gametime is a lightweight, streaming-friendly dataset for quick TTS/ASR prototyping.
36
+ Audio is stored directly as raw bytes in Parquet (no `Audio` feature), so you can stream and decode without extra dependencies.
37
+
38
  ---
39
 
40
+ ## πŸ“¦ Download Options
41
 
42
+ ### 1️⃣ Recommended β€” Stream from Hugging Face
43
  ```python
44
  from datasets import load_dataset
45
  import io, soundfile as sf
 
47
  ds = load_dataset("gametime-benchmark/gametime", "basic", split="train", streaming=True)
48
 
49
  ex = next(iter(ds))
50
+ buf = io.BytesIO(ex["audio_bytes"])
51
+ wav, sr = sf.read(buf, dtype="float32")
52
  print(ex["id"], sr, len(wav), ex["text"])
53
  ````
54
 
55
+ * Works with **`streaming=True`** β€” no full download needed
56
+ * Requires only `soundfile` (libsndfile)
57
+
58
+ ---
59
+
60
+ ### 2️⃣ Optional β€” Full ZIP Download
61
+
62
+ If you prefer the original folder layout:
63
+
64
+ ```
65
+ gametime/basic/
66
+ β”œβ”€β”€ 1-a-Sequence-Number-dataset.json
67
+ β”œβ”€β”€ ...*-dataset.json
68
+ β”œβ”€β”€ audios/
69
+ β”‚ β”œβ”€β”€ 1-a-Sequence-Number/
70
+ β”‚ β”‚ β”œβ”€β”€ train/*.wav
71
+ β”‚ β”‚ β”œβ”€β”€ test/*.wav
72
+ ...
73
+ ```
74
+
75
+ You can download and unzip:
76
+
77
+ ```bash
78
+ wget https://huggingface.co/datasets/gametime-benchmark/gametime/resolve/main/gametime/download/gametime_basic_v1.zip
79
+ unzip gametime_basic_v1.zip
80
+ ```
81
+
82
+ This preserves the `gametime/basic` directory tree exactly as in source.
83
 
84
  ---
85
 
86
+ ## πŸ“‘ Schema
87
 
88
+ Each Parquet row has:
89
 
90
+ | Column | Type | Description |
91
+ | --------------- | ----- | -------------------------------------------------------------- |
92
+ | `id` | str | e.g. `1-a-Sequence-Number/train/1-a-Sequence-Number-01-01.wav` |
93
+ | `category` | str | `"basic"` |
94
+ | `dataset` | str | group name (e.g. `1-a-Sequence-Number`) |
95
+ | `split` | str | `train` or `test` |
96
+ | `template_idx` | str | template index if available |
97
+ | `item_idx` | str | item index if available |
98
+ | `text` | str | reference transcription / prompt |
99
+ | `audio_bytes` | bytes | raw WAV file bytes |
100
+ | `audio_format` | str | `"wav"` |
101
+ | `sampling_rate` | int | e.g., `16000` |
102
 
103
  ---
104
 
105
+ ## πŸ” Example β€” Whisper ASR Sanity Check
106
 
107
  ```python
108
+ # pip install transformers datasets soundfile evaluate jiwer torchaudio
109
  import io
110
  import soundfile as sf
111
  import evaluate
 
122
  wav, sr = sf.read(io.BytesIO(ex["audio_bytes"]), dtype="float32")
123
  hyp = asr({"array": wav, "sampling_rate": sr})["text"]
124
  refs.append(ex["text"]); hyps.append(hyp)
125
+ print(f"Sample {i+1}: {ex['text']} -> {hyp}")
126
  if i >= 199: # quick 200-sample check
127
  break
128
 
 
131
 
132
  ---
133
 
134
+ ## πŸ“ Notes
135
 
136
+ * **Advanced** split (with `<sil="Xms"/>` timing tokens) is planned separately.
137
  * License: **CC BY 4.0** for text, metadata, and audio.
138
+ * ZIP download is optional; Parquet streaming is the default recommended method.
139
 
140
  ---
141
 
142
+ ## πŸ“š Citation
143
 
144
  ```
145
  @dataset{gametime_basic_2025,
download/gametime_basic_v1.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3055163b7522459e6da2010f46257ab80346709365f3a0a8c7800ccac9d52c3c
3
+ size 705988219
download/gametime_basic_v1.zip.sha256 ADDED
@@ -0,0 +1 @@
 
 
1
+ 3055163b7522459e6da2010f46257ab80346709365f3a0a8c7800ccac9d52c3c gametime_basic_v1.zip