add split train and test
Browse files- audio_transcription.csv.gz +0 -3
- librivox-indonesia.py +12 -6
- librivox-indonesia.tgz +0 -3
audio_transcription.csv.gz
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:92e0830dc9642ed5e92ebbceb7d65e5f6b90979d4bfda451b2d8970506a63791
|
3 |
-
size 207161
|
|
|
|
|
|
|
|
librivox-indonesia.py
CHANGED
@@ -31,8 +31,8 @@ _HOMEPAGE = "https://huggingface.co/indonesian-nlp/librivox-indonesia"
|
|
31 |
|
32 |
_LICENSE = "https://creativecommons.org/publicdomain/zero/1.0/"
|
33 |
|
34 |
-
_AUDIO_URL = "https://huggingface.co/datasets/cahya/librivox-indonesia/resolve/main/librivox-indonesia.tgz"
|
35 |
-
_METADATA_URL = "https://huggingface.co/datasets/cahya/librivox-indonesia/resolve/main/
|
36 |
|
37 |
|
38 |
class LibriVoxIndonesiaConfig(datasets.BuilderConfig):
|
@@ -109,9 +109,7 @@ class LibriVoxIndonesia(datasets.GeneratorBasedBuilder):
|
|
109 |
dl_manager.download_config.ignore_url_params = True
|
110 |
|
111 |
audio_path = dl_manager.download(_AUDIO_URL)
|
112 |
-
metadata_path = dl_manager.download_and_extract(_METADATA_URL)
|
113 |
local_extracted_archive = dl_manager.extract(audio_path) if not dl_manager.is_streaming else None
|
114 |
-
print("Metadata Path", metadata_path)
|
115 |
path_to_clips = "librivox-indonesia"
|
116 |
|
117 |
return [
|
@@ -120,7 +118,16 @@ class LibriVoxIndonesia(datasets.GeneratorBasedBuilder):
|
|
120 |
gen_kwargs={
|
121 |
"local_extracted_archive": local_extracted_archive,
|
122 |
"audio_files": dl_manager.iter_archive(audio_path),
|
123 |
-
"metadata_path":
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
"path_to_clips": path_to_clips,
|
125 |
},
|
126 |
),
|
@@ -153,7 +160,6 @@ class LibriVoxIndonesia(datasets.GeneratorBasedBuilder):
|
|
153 |
# set the audio feature and the path to the extracted file
|
154 |
path = os.path.join(local_extracted_archive, path) if local_extracted_archive else path
|
155 |
result["audio"] = {"path": path, "bytes": f.read()}
|
156 |
-
# set path to None if the audio file doesn't exist locally (i.e. in streaming mode)
|
157 |
result["path"] = path
|
158 |
yield id_, result
|
159 |
id_ += 1
|
|
|
31 |
|
32 |
_LICENSE = "https://creativecommons.org/publicdomain/zero/1.0/"
|
33 |
|
34 |
+
_AUDIO_URL = "https://huggingface.co/datasets/cahya/librivox-indonesia/resolve/main/data/librivox-indonesia.tgz"
|
35 |
+
_METADATA_URL = "https://huggingface.co/datasets/cahya/librivox-indonesia/resolve/main/data"
|
36 |
|
37 |
|
38 |
class LibriVoxIndonesiaConfig(datasets.BuilderConfig):
|
|
|
109 |
dl_manager.download_config.ignore_url_params = True
|
110 |
|
111 |
audio_path = dl_manager.download(_AUDIO_URL)
|
|
|
112 |
local_extracted_archive = dl_manager.extract(audio_path) if not dl_manager.is_streaming else None
|
|
|
113 |
path_to_clips = "librivox-indonesia"
|
114 |
|
115 |
return [
|
|
|
118 |
gen_kwargs={
|
119 |
"local_extracted_archive": local_extracted_archive,
|
120 |
"audio_files": dl_manager.iter_archive(audio_path),
|
121 |
+
"metadata_path": dl_manager.download_and_extract(_METADATA_URL + "/metadata_train.csv.gz"),
|
122 |
+
"path_to_clips": path_to_clips,
|
123 |
+
},
|
124 |
+
),
|
125 |
+
datasets.SplitGenerator(
|
126 |
+
name=datasets.Split.TEST,
|
127 |
+
gen_kwargs={
|
128 |
+
"local_extracted_archive": local_extracted_archive,
|
129 |
+
"audio_files": dl_manager.iter_archive(audio_path),
|
130 |
+
"metadata_path": dl_manager.download_and_extract(_METADATA_URL + "/metadata_test.csv.gz"),
|
131 |
"path_to_clips": path_to_clips,
|
132 |
},
|
133 |
),
|
|
|
160 |
# set the audio feature and the path to the extracted file
|
161 |
path = os.path.join(local_extracted_archive, path) if local_extracted_archive else path
|
162 |
result["audio"] = {"path": path, "bytes": f.read()}
|
|
|
163 |
result["path"] = path
|
164 |
yield id_, result
|
165 |
id_ += 1
|
librivox-indonesia.tgz
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:fb20e579f5813b019c871064e10b0cc0781848283f90f243a29c2f6f7ffba1a3
|
3 |
-
size 321049598
|
|
|
|
|
|
|
|