updated
Browse files
test01.py
CHANGED
@@ -12,7 +12,7 @@
|
|
12 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13 |
# See the License for the specific language governing permissions and
|
14 |
# limitations under the License.
|
15 |
-
"""
|
16 |
|
17 |
|
18 |
import csv
|
@@ -83,7 +83,7 @@ class Test01(datasets.GeneratorBasedBuilder):
|
|
83 |
total_languages = len(STATS["locales"])
|
84 |
total_valid_hours = STATS["totalValidHrs"]
|
85 |
description = (
|
86 |
-
"
|
87 |
f"The dataset currently consists of {total_valid_hours} validated hours of speech "
|
88 |
f" in {total_languages} languages, but more voices and languages are always added."
|
89 |
)
|
@@ -105,33 +105,15 @@ class Test01(datasets.GeneratorBasedBuilder):
|
|
105 |
license=_LICENSE,
|
106 |
citation=_CITATION,
|
107 |
version=self.config.version,
|
108 |
-
# task_templates=[
|
109 |
-
# AutomaticSpeechRecognition(audio_file_path_column="path", transcription_column="sentence")
|
110 |
-
# ],
|
111 |
)
|
112 |
|
113 |
def _split_generators(self, dl_manager):
|
114 |
"""Returns SplitGenerators."""
|
115 |
-
"""
|
116 |
-
hf_auth_token = dl_manager.download_config.use_auth_token
|
117 |
-
if hf_auth_token is None:
|
118 |
-
raise ConnectionError(
|
119 |
-
"Please set use_auth_token=True or use_auth_token='<TOKEN>' to download this dataset"
|
120 |
-
)
|
121 |
-
"""
|
122 |
-
|
123 |
-
bundle_url_template = STATS["bundleURLTemplate"]
|
124 |
-
bundle_version = bundle_url_template.split("/")[0]
|
125 |
dl_manager.download_config.ignore_url_params = True
|
126 |
|
127 |
archive_path = dl_manager.download(_AUDIO_URL)
|
128 |
local_extracted_archive = dl_manager.extract(archive_path) if not dl_manager.is_streaming else None
|
129 |
-
|
130 |
-
if self.config.version < datasets.Version("5.0.0"):
|
131 |
-
path_to_data = ""
|
132 |
-
else:
|
133 |
-
path_to_data = ""
|
134 |
-
path_to_clips = "/".join([path_to_data, "audio"]) if path_to_data else "audio"
|
135 |
|
136 |
return [
|
137 |
datasets.SplitGenerator(
|
@@ -139,7 +121,7 @@ class Test01(datasets.GeneratorBasedBuilder):
|
|
139 |
gen_kwargs={
|
140 |
"local_extracted_archive": local_extracted_archive,
|
141 |
"archive_iterator": dl_manager.iter_archive(archive_path),
|
142 |
-
"metadata_filepath": "
|
143 |
"path_to_clips": path_to_clips,
|
144 |
},
|
145 |
),
|
|
|
12 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13 |
# See the License for the specific language governing permissions and
|
14 |
# limitations under the License.
|
15 |
+
""" LibriVox-Indonesia Dataset"""
|
16 |
|
17 |
|
18 |
import csv
|
|
|
83 |
total_languages = len(STATS["locales"])
|
84 |
total_valid_hours = STATS["totalValidHrs"]
|
85 |
description = (
|
86 |
+
"LibriVox-Indonesia is a speech dataset generated from LibriVox with only languages from Indonesia."
|
87 |
f"The dataset currently consists of {total_valid_hours} validated hours of speech "
|
88 |
f" in {total_languages} languages, but more voices and languages are always added."
|
89 |
)
|
|
|
105 |
license=_LICENSE,
|
106 |
citation=_CITATION,
|
107 |
version=self.config.version,
|
|
|
|
|
|
|
108 |
)
|
109 |
|
110 |
def _split_generators(self, dl_manager):
|
111 |
"""Returns SplitGenerators."""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
dl_manager.download_config.ignore_url_params = True
|
113 |
|
114 |
archive_path = dl_manager.download(_AUDIO_URL)
|
115 |
local_extracted_archive = dl_manager.extract(archive_path) if not dl_manager.is_streaming else None
|
116 |
+
path_to_clips = "audio"
|
|
|
|
|
|
|
|
|
|
|
117 |
|
118 |
return [
|
119 |
datasets.SplitGenerator(
|
|
|
121 |
gen_kwargs={
|
122 |
"local_extracted_archive": local_extracted_archive,
|
123 |
"archive_iterator": dl_manager.iter_archive(archive_path),
|
124 |
+
"metadata_filepath": "audio_transcription.csv",
|
125 |
"path_to_clips": path_to_clips,
|
126 |
},
|
127 |
),
|