yoom618 commited on
Commit
3245442
·
verified ·
1 Parent(s): ddfe70e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +49 -3
README.md CHANGED
@@ -1,3 +1,49 @@
1
- ---
2
- license: cc-by-4.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-4.0
3
+ task_categories:
4
+ - automatic-speech-recognition
5
+ language:
6
+ - en
7
+ size_categories:
8
+ - 100K<n<1M
9
+ ---
10
+
11
+
12
+
13
+
14
+
15
+ # How to Use
16
+
17
+ - Almost the same with [Librispeech](https://huggingface.co/datasets/openslr/librispeech_asr) dataset module since i refered to the [source code](https://huggingface.co/datasets/openslr/librispeech_asr/blob/main/librispeech_asr.py).
18
+
19
+
20
+ ```python
21
+ from datasets import load_dataset
22
+ from pprint import pprint
23
+ from IPython.display import display, Audio
24
+ import aiohttp
25
+ import os
26
+
27
+ # set huggingface cache directory for the extracted raw files and huggingface-cli token
28
+ os.environ['HF_HOME'] = "/data/to/download"
29
+ !export HF_HOME="/data/to/download"
30
+
31
+
32
+ # download dataset
33
+ # if already have librispeech_asr in the cache_dir it will use the same audio files.
34
+ libripc = load_dataset("yoom618/librispeech_pc",
35
+ "all", # all, clean, other
36
+ cache_dir="/data/to/download",
37
+ trust_remote_code=True,
38
+ # storage_options={'client_kwargs': {'timeout': aiohttp.ClientTimeout(total=7200)}}, # add if you need to increase the timeout
39
+
40
+
41
+ # check dataset info
42
+ print(libripc)
43
+
44
+ display(Audio(libripc['train.clean.100'][0]['audio']['array'],
45
+ rate=libripc['train.clean.100'][0]['audio']['sample_rate']),
46
+ autoplay=False)
47
+ pprint(libripc['train.clean.100'][0]['audio'])
48
+
49
+ ```