guapaQAQ commited on
Commit
9075ab3
·
1 Parent(s): ca11b91

Update README

Browse files
Files changed (1) hide show
  1. README.md +9 -4
README.md CHANGED
@@ -50,17 +50,22 @@ The **Gametime** dataset provides lightweight, streaming-friendly splits for TTS
50
 
51
  ```python
52
  from datasets import load_dataset
53
- import io, soundfile as sf
 
54
 
55
  # Load Basic train split
56
- ds_basic = load_dataset("gametime-benchmark/gametime", "basic", split="train", streaming=True)
57
  ex = next(iter(ds_basic))
58
- print(ex["id"], ex["text"])
 
 
59
 
60
  # Load Advanced test split
61
  ds_adv = load_dataset("gametime-benchmark/gametime", "advanced", split="test", streaming=True)
62
  ex_adv = next(iter(ds_adv))
63
- print(ex_adv["id"], ex_adv["text"])
 
 
64
  ```
65
 
66
  * Works with **`streaming=True`** — no full download needed
 
50
 
51
  ```python
52
  from datasets import load_dataset
53
+ import io
54
+ import soundfile as sf
55
 
56
  # Load Basic train split
57
+ ds_basic = load_dataset("gametime-benchmark/gametime", "basic", split="test", streaming=True)
58
  ex = next(iter(ds_basic))
59
+ buf = io.BytesIO(ex["audio_bytes"])
60
+ wav, sr = sf.read(buf, dtype="float32")
61
+ print(ex["id"], sr, len(wav), ex["text"])
62
 
63
  # Load Advanced test split
64
  ds_adv = load_dataset("gametime-benchmark/gametime", "advanced", split="test", streaming=True)
65
  ex_adv = next(iter(ds_adv))
66
+ buf_adv = io.BytesIO(ex_adv["audio_bytes"])
67
+ wav_adv, sr_adv = sf.read(buf_adv, dtype="float32")
68
+ print(ex_adv["id"], sr_adv, len(wav_adv), ex_adv["text"])
69
  ```
70
 
71
  * Works with **`streaming=True`** — no full download needed