Datasets:
Convert dataset to Parquet (#2)
Browse files- Convert dataset to Parquet (2e14e74752e1f4764bc4d992f289f3eea1627895)
- Delete data file (8fe2104c29e812f7dea2ca48bdb68418fed9f86a)
- Delete data file (0d7903ea478a6cbc2e3c6af4b3f6ed4f1e9b5d66)
- Delete loading script (0445f895a50541af7d2d296b1e138962b99e080d)
- Delete data file (4af8cc5941f1b34eeccc74195714d6195a2b529f)
- Delete data file (e60b6453747a67330481eea7177d841fb8e2f70a)
- Delete data file (ff079e071688845b02c73f696493a65a63aa0b99)
- Delete data file (8ec520602fb6166c7152ef62eac331ab1e59b134)
- Delete data file (f759d94bfe05fdeec2d64c729709819b7cb2e6dc)
- Delete data file (b82dd1f9862e92dfa792f64747a2c54e00daeae9)
- Delete data file (904e84f5f1891b8a464b67b2f13f3454e5e15574)
- Delete data file (2fde1b3481d6d8b93959ae046c2315c2323b1efa)
- Delete data file (4f1ffcf93090e2efc962fc9f267958200ff17bee)
- Delete data file (6866445cf98f57d826cfd4aa26eb2acc9e5d4f7f)
- README.md +39 -0
- corpus/files/metadata_dev.tsv +0 -11
- corpus/files/metadata_test.tsv +0 -11
- corpus/files/metadata_train.tsv +0 -21
- corpus/files/tars_dev.paths +0 -1
- corpus/files/tars_test.paths +0 -1
- corpus/files/tars_train.paths +0 -1
- corpus/speech/dev.tar.gz.lock +0 -0
- corpus/speech/test.tar.gz.lock +0 -0
- corpus/speech/train.tar.gz.lock +0 -0
- toy_corpus_asr_es.py +0 -149
- corpus/speech/dev.tar.gz → toy_corpus_asr_es/test-00000-of-00001.parquet +2 -2
- corpus/speech/train.tar.gz → toy_corpus_asr_es/train-00000-of-00001.parquet +2 -2
- corpus/speech/test.tar.gz → toy_corpus_asr_es/validation-00000-of-00001.parquet +2 -2
@@ -1,3 +1,42 @@
|
|
1 |
---
|
2 |
license: cc-by-4.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
---
|
|
|
1 |
---
|
2 |
license: cc-by-4.0
|
3 |
+
dataset_info:
|
4 |
+
config_name: toy_corpus_asr_es
|
5 |
+
features:
|
6 |
+
- name: audio_id
|
7 |
+
dtype: string
|
8 |
+
- name: audio
|
9 |
+
dtype:
|
10 |
+
audio:
|
11 |
+
sampling_rate: 16000
|
12 |
+
- name: split
|
13 |
+
dtype: string
|
14 |
+
- name: gender
|
15 |
+
dtype: string
|
16 |
+
- name: normalized_text
|
17 |
+
dtype: string
|
18 |
+
- name: relative_path
|
19 |
+
dtype: string
|
20 |
+
splits:
|
21 |
+
- name: train
|
22 |
+
num_bytes: 1557851.0
|
23 |
+
num_examples: 20
|
24 |
+
- name: validation
|
25 |
+
num_bytes: 974796.0
|
26 |
+
num_examples: 10
|
27 |
+
- name: test
|
28 |
+
num_bytes: 809201.0
|
29 |
+
num_examples: 10
|
30 |
+
download_size: 3348995
|
31 |
+
dataset_size: 3341848.0
|
32 |
+
configs:
|
33 |
+
- config_name: toy_corpus_asr_es
|
34 |
+
data_files:
|
35 |
+
- split: train
|
36 |
+
path: toy_corpus_asr_es/train-*
|
37 |
+
- split: validation
|
38 |
+
path: toy_corpus_asr_es/validation-*
|
39 |
+
- split: test
|
40 |
+
path: toy_corpus_asr_es/test-*
|
41 |
+
default: true
|
42 |
---
|
@@ -1,11 +0,0 @@
|
|
1 |
-
audio_id split gender normalized_text relative_path
|
2 |
-
common_voice_es_18328658 dev male ni siquiera pienses en eso vaquero o sí muchacho rudo corpus/speech/dev/male/common_voice_es_18328658.flac
|
3 |
-
common_voice_es_18549611 dev female invitados del cumpleaños a las tres en punto cálmense todos corpus/speech/dev/female/common_voice_es_18549611.flac
|
4 |
-
common_voice_es_19026674 dev male en la supervivencia de la especie corpus/speech/dev/male/common_voice_es_19026674.flac
|
5 |
-
common_voice_es_19159450 dev male antes de la llegada de los europeos era fue una potencia política en halmahera corpus/speech/dev/male/common_voice_es_19159450.flac
|
6 |
-
common_voice_es_19597257 dev male la liga quedó interrumpida en los últimos años de la segunda guerra mundial corpus/speech/dev/male/common_voice_es_19597257.flac
|
7 |
-
common_voice_es_19603417 dev female desde entonces ha participado en numerosas novilladas sin picadores corpus/speech/dev/female/common_voice_es_19603417.flac
|
8 |
-
common_voice_es_19604077 dev male apareció en la película toma estas alas rotas corpus/speech/dev/male/common_voice_es_19604077.flac
|
9 |
-
common_voice_es_19666365 dev female sin embargo a lo largo del capítulo subyace una gran pregunta corpus/speech/dev/female/common_voice_es_19666365.flac
|
10 |
-
common_voice_es_19738526 dev female fue su reino en su tiempo el más poderoso e influyente de europa occidental corpus/speech/dev/female/common_voice_es_19738526.flac
|
11 |
-
common_voice_es_19942148 dev female en las últimas versiones de final cut pro apple inc corpus/speech/dev/female/common_voice_es_19942148.flac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1,11 +0,0 @@
|
|
1 |
-
audio_id split gender normalized_text relative_path
|
2 |
-
common_voice_es_18307761 test male y calló tal vez esperando una disculpa amante pero yo preferí guardar silencio corpus/speech/test/male/common_voice_es_18307761.flac
|
3 |
-
common_voice_es_18569707 test male esos hombres son profesionales son los mejores corpus/speech/test/male/common_voice_es_18569707.flac
|
4 |
-
common_voice_es_18831947 test male uno levanta la caza y otro la mata corpus/speech/test/male/common_voice_es_18831947.flac
|
5 |
-
common_voice_es_19131994 test female ante esta situación el oficial mandó prender fuego a la casa corpus/speech/test/female/common_voice_es_19131994.flac
|
6 |
-
common_voice_es_19523672 test male fue vicario apostólico del uruguay corpus/speech/test/male/common_voice_es_19523672.flac
|
7 |
-
common_voice_es_19610763 test male se desempeñó como mediocampista ofensivo corpus/speech/test/male/common_voice_es_19610763.flac
|
8 |
-
common_voice_es_19629310 test female esta pieza se retira del paciente junto con la aguja corpus/speech/test/female/common_voice_es_19629310.flac
|
9 |
-
common_voice_es_19699841 test female el grupo que acabe antes será el ganador corpus/speech/test/female/common_voice_es_19699841.flac
|
10 |
-
common_voice_es_19960886 test female el gobierno estadounidense no la reconoció como representante del pueblo cubano corpus/speech/test/female/common_voice_es_19960886.flac
|
11 |
-
common_voice_es_20260627 test female fue redactor en jefe de la página deportiva de el diario el país corpus/speech/test/female/common_voice_es_20260627.flac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1,21 +0,0 @@
|
|
1 |
-
audio_id split gender normalized_text relative_path
|
2 |
-
common_voice_es_18306568 train male no me hables acerca de importancia corpus/speech/train/male/common_voice_es_18306568.flac
|
3 |
-
common_voice_es_18320698 train male he restringido el acceso a la cubierta superior corpus/speech/train/male/common_voice_es_18320698.flac
|
4 |
-
common_voice_es_19596707 train male los orígenes precisos de the hood son desconocidos corpus/speech/train/male/common_voice_es_19596707.flac
|
5 |
-
common_voice_es_20501506 train male una vez destruidos se pierden inexorablemente corpus/speech/train/male/common_voice_es_20501506.flac
|
6 |
-
common_voice_es_20507096 train male el resto están todas en inglaterra corpus/speech/train/male/common_voice_es_20507096.flac
|
7 |
-
common_voice_es_20511043 train male las canciones de los comerciales sirvieron como singles para lee entre sus álbumes corpus/speech/train/male/common_voice_es_20511043.flac
|
8 |
-
common_voice_es_20711016 train female los hombres se quedan a jugar a las cartas hasta que amanece sin dormir corpus/speech/train/female/common_voice_es_20711016.flac
|
9 |
-
common_voice_es_20711252 train female con trece años comienza a realizar pequeños papeles para series de televisión y cine corpus/speech/train/female/common_voice_es_20711252.flac
|
10 |
-
common_voice_es_20717545 train female su actividad fuera del campo fue variada corpus/speech/train/female/common_voice_es_20717545.flac
|
11 |
-
common_voice_es_20717953 train female actualmente no está activo corpus/speech/train/female/common_voice_es_20717953.flac
|
12 |
-
common_voice_es_20722210 train female es nativo de farmington hills michigan corpus/speech/train/female/common_voice_es_20722210.flac
|
13 |
-
common_voice_es_20722849 train female incluye el navegador web safari y la aplicación mail de apple corpus/speech/train/female/common_voice_es_20722849.flac
|
14 |
-
common_voice_es_20724424 train female desempeña un papel vital en la promoción del talento nacional e internacional emergente corpus/speech/train/female/common_voice_es_20724424.flac
|
15 |
-
common_voice_es_20725001 train female las grabaciones se extendieron hasta finales del mes de mayo corpus/speech/train/female/common_voice_es_20725001.flac
|
16 |
-
common_voice_es_20931278 train female entre las personas nombradas se encontraba carlos alberto lacoste corpus/speech/train/female/common_voice_es_20931278.flac
|
17 |
-
common_voice_es_20932253 train female hasta el presente ningún vehículo orbital reutilizable real se ha llegado a usar corpus/speech/train/female/common_voice_es_20932253.flac
|
18 |
-
common_voice_es_21469616 train male sus principales producciones fueron escritas para ser representadas ó cantadas corpus/speech/train/male/common_voice_es_21469616.flac
|
19 |
-
common_voice_es_21486095 train male permite eliminar los reflejos luminosos y obtener efectos con las sombras corpus/speech/train/male/common_voice_es_21486095.flac
|
20 |
-
common_voice_es_21543608 train male el número y clase de pájaros varía en cada nivel corpus/speech/train/male/common_voice_es_21543608.flac
|
21 |
-
common_voice_es_21580953 train male la parte norte del brocal es más irregular con una protuberancia hacia el norte noroeste corpus/speech/train/male/common_voice_es_21580953.flac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1 +0,0 @@
|
|
1 |
-
corpus/speech/dev.tar.gz
|
|
|
|
@@ -1 +0,0 @@
|
|
1 |
-
corpus/speech/test.tar.gz
|
|
|
|
@@ -1 +0,0 @@
|
|
1 |
-
corpus/speech/train.tar.gz
|
|
|
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,149 +0,0 @@
|
|
1 |
-
from collections import defaultdict
|
2 |
-
import os
|
3 |
-
import json
|
4 |
-
import csv
|
5 |
-
|
6 |
-
import datasets
|
7 |
-
|
8 |
-
_NAME="toy_corpus_asr_es"
|
9 |
-
_VERSION="1.0.0"
|
10 |
-
_AUDIO_EXTENSIONS=".flac"
|
11 |
-
|
12 |
-
_DESCRIPTION = """
|
13 |
-
An extremely small corpus of 40 audio files taken from Common Voice (es) with the objective of testing how to share datasets in Hugging Face.
|
14 |
-
"""
|
15 |
-
|
16 |
-
_CITATION = """
|
17 |
-
@misc{toy_corpus_asr_es,
|
18 |
-
title={Toy Corpus for ASR in Spanish.},
|
19 |
-
author={Hernandez Mena, Carlos Daniel},
|
20 |
-
year={2022},
|
21 |
-
url={https://huggingface.co/datasets/carlosdanielhernandezmena/toy_corpus_asr_es},
|
22 |
-
}
|
23 |
-
"""
|
24 |
-
|
25 |
-
_HOMEPAGE = "https://huggingface.co/datasets/carlosdanielhernandezmena/toy_corpus_asr_es"
|
26 |
-
|
27 |
-
_LICENSE = "CC-BY-4.0, See https://creativecommons.org/licenses/by/4.0/"
|
28 |
-
|
29 |
-
_BASE_DATA_DIR = "corpus/"
|
30 |
-
_METADATA_TRAIN = os.path.join(_BASE_DATA_DIR,"files","metadata_train.tsv")
|
31 |
-
_METADATA_TEST = os.path.join(_BASE_DATA_DIR,"files", "metadata_test.tsv")
|
32 |
-
_METADATA_DEV = os.path.join(_BASE_DATA_DIR,"files", "metadata_dev.tsv")
|
33 |
-
|
34 |
-
_TARS_TRAIN = os.path.join(_BASE_DATA_DIR,"files","tars_train.paths")
|
35 |
-
_TARS_TEST = os.path.join(_BASE_DATA_DIR,"files", "tars_test.paths")
|
36 |
-
_TARS_DEV = os.path.join(_BASE_DATA_DIR,"files", "tars_dev.paths")
|
37 |
-
|
38 |
-
class ToyCorpusAsrEsConfig(datasets.BuilderConfig):
|
39 |
-
"""BuilderConfig for Toy Corpus ASR ES."""
|
40 |
-
|
41 |
-
def __init__(self, name, **kwargs):
|
42 |
-
name=_NAME
|
43 |
-
super().__init__(name=name, **kwargs)
|
44 |
-
|
45 |
-
class ToyCorpusAsrEs(datasets.GeneratorBasedBuilder):
|
46 |
-
"""The Toy Corpus ASR ES dataset."""
|
47 |
-
|
48 |
-
VERSION = datasets.Version(_VERSION)
|
49 |
-
BUILDER_CONFIGS = [
|
50 |
-
ToyCorpusAsrEsConfig(
|
51 |
-
name=_NAME,
|
52 |
-
version=datasets.Version(_VERSION),
|
53 |
-
)
|
54 |
-
]
|
55 |
-
|
56 |
-
def _info(self):
|
57 |
-
features = datasets.Features(
|
58 |
-
{
|
59 |
-
"audio_id": datasets.Value("string"),
|
60 |
-
"audio": datasets.Audio(sampling_rate=16000),
|
61 |
-
"split": datasets.Value("string"),
|
62 |
-
"gender": datasets.Value("string"),
|
63 |
-
"normalized_text": datasets.Value("string"),
|
64 |
-
"relative_path": datasets.Value("string"),
|
65 |
-
}
|
66 |
-
)
|
67 |
-
return datasets.DatasetInfo(
|
68 |
-
description=_DESCRIPTION,
|
69 |
-
features=features,
|
70 |
-
homepage=_HOMEPAGE,
|
71 |
-
license=_LICENSE,
|
72 |
-
citation=_CITATION,
|
73 |
-
)
|
74 |
-
|
75 |
-
def _split_generators(self, dl_manager):
|
76 |
-
|
77 |
-
metadata_train=dl_manager.download_and_extract(_METADATA_TRAIN)
|
78 |
-
metadata_test=dl_manager.download_and_extract(_METADATA_TEST)
|
79 |
-
metadata_dev=dl_manager.download_and_extract(_METADATA_DEV)
|
80 |
-
|
81 |
-
tars_train=dl_manager.download_and_extract(_TARS_TRAIN)
|
82 |
-
tars_test=dl_manager.download_and_extract(_TARS_TEST)
|
83 |
-
tars_dev=dl_manager.download_and_extract(_TARS_DEV)
|
84 |
-
|
85 |
-
hash_tar_files=defaultdict(dict)
|
86 |
-
with open(tars_train,'r') as f:
|
87 |
-
hash_tar_files['train']=[path.replace('\n','') for path in f]
|
88 |
-
|
89 |
-
with open(tars_test,'r') as f:
|
90 |
-
hash_tar_files['test']=[path.replace('\n','') for path in f]
|
91 |
-
|
92 |
-
with open(tars_dev,'r') as f:
|
93 |
-
hash_tar_files['dev']=[path.replace('\n','') for path in f]
|
94 |
-
|
95 |
-
hash_meta_paths={"train":metadata_train,"test":metadata_test,"dev":metadata_dev}
|
96 |
-
audio_paths = dl_manager.download(hash_tar_files)
|
97 |
-
|
98 |
-
splits=["train","dev","test"]
|
99 |
-
local_extracted_audio_paths = (
|
100 |
-
dl_manager.extract(audio_paths) if not dl_manager.is_streaming else
|
101 |
-
{
|
102 |
-
split:[None] * len(audio_paths[split]) for split in splits
|
103 |
-
}
|
104 |
-
)
|
105 |
-
|
106 |
-
return [
|
107 |
-
datasets.SplitGenerator(
|
108 |
-
name=datasets.Split.TRAIN,
|
109 |
-
gen_kwargs={
|
110 |
-
"audio_archives":[dl_manager.iter_archive(archive) for archive in audio_paths["train"]],
|
111 |
-
"local_extracted_archives_paths": local_extracted_audio_paths["train"],
|
112 |
-
"metadata_paths": hash_meta_paths["train"],
|
113 |
-
}
|
114 |
-
),
|
115 |
-
datasets.SplitGenerator(
|
116 |
-
name=datasets.Split.VALIDATION,
|
117 |
-
gen_kwargs={
|
118 |
-
"audio_archives": [dl_manager.iter_archive(archive) for archive in audio_paths["dev"]],
|
119 |
-
"local_extracted_archives_paths": local_extracted_audio_paths["dev"],
|
120 |
-
"metadata_paths": hash_meta_paths["dev"],
|
121 |
-
}
|
122 |
-
),
|
123 |
-
datasets.SplitGenerator(
|
124 |
-
name=datasets.Split.TEST,
|
125 |
-
gen_kwargs={
|
126 |
-
"audio_archives": [dl_manager.iter_archive(archive) for archive in audio_paths["test"]],
|
127 |
-
"local_extracted_archives_paths": local_extracted_audio_paths["test"],
|
128 |
-
"metadata_paths": hash_meta_paths["test"],
|
129 |
-
}
|
130 |
-
),
|
131 |
-
]
|
132 |
-
|
133 |
-
def _generate_examples(self, audio_archives, local_extracted_archives_paths, metadata_paths):
|
134 |
-
|
135 |
-
features = ["normalized_text","gender","split","relative_path"]
|
136 |
-
|
137 |
-
with open(metadata_paths) as f:
|
138 |
-
metadata = {x["audio_id"]: x for x in csv.DictReader(f, delimiter="\t")}
|
139 |
-
|
140 |
-
for audio_archive, local_extracted_archive_path in zip(audio_archives, local_extracted_archives_paths):
|
141 |
-
for audio_filename, audio_file in audio_archive:
|
142 |
-
#audio_id = audio_filename.split(os.sep)[-1].split(_AUDIO_EXTENSIONS)[0]
|
143 |
-
audio_id =os.path.splitext(os.path.basename(audio_filename))[0]
|
144 |
-
path = os.path.join(local_extracted_archive_path, audio_filename) if local_extracted_archive_path else audio_filename
|
145 |
-
yield audio_id, {
|
146 |
-
"audio_id": audio_id,
|
147 |
-
**{feature: metadata[audio_id][feature] for feature in features},
|
148 |
-
"audio": {"path": path, "bytes": audio_file.read()},
|
149 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1a7392478f475db421a8fccea2732485eeee47afd444050f665c4551d1f04005
|
3 |
+
size 810505
|
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:03030602286e64324044068d87c79a7d88c651a8da3da81c2d71d1cfb174186b
|
3 |
+
size 1560378
|
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:70bf5ba8051771316a61cb04ca9306cc8b2acb53741d41820eade963aeb5aa86
|
3 |
+
size 978112
|