Datasets:
Convert dataset to Parquet
#1
by
carlosdanielhernandezmena
- opened
- README.md +36 -6
- ciempiess_light.py +0 -123
- corpus/speech/train.tar.gz → ciempiess_light/train-00000-of-00004.parquet +2 -2
- ciempiess_light/train-00001-of-00004.parquet +3 -0
- ciempiess_light/train-00002-of-00004.parquet +3 -0
- ciempiess_light/train-00003-of-00004.parquet +3 -0
- corpus/files/metadata_train.tsv +0 -0
- corpus/files/tars_train.paths +0 -1
README.md
CHANGED
@@ -1,28 +1,58 @@
|
|
1 |
---
|
2 |
annotations_creators:
|
3 |
- expert-generated
|
4 |
-
language:
|
5 |
-
- es
|
6 |
language_creators:
|
7 |
- other
|
|
|
|
|
8 |
license:
|
9 |
- cc-by-sa-4.0
|
10 |
multilinguality:
|
11 |
- monolingual
|
12 |
-
pretty_name: 'CIEMPIESS LIGHT CORPUS: Audio and Transcripts of Mexican Spanish Broadcast Conversations.'
|
13 |
size_categories:
|
14 |
- 10K<n<100K
|
15 |
source_datasets:
|
16 |
- original
|
|
|
|
|
|
|
|
|
|
|
17 |
tags:
|
18 |
- ciempiess
|
19 |
- spanish
|
20 |
- mexican spanish
|
21 |
- ciempiess project
|
22 |
- ciempiess-unam project
|
23 |
-
|
24 |
-
|
25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
---
|
27 |
|
28 |
|
|
|
1 |
---
|
2 |
annotations_creators:
|
3 |
- expert-generated
|
|
|
|
|
4 |
language_creators:
|
5 |
- other
|
6 |
+
language:
|
7 |
+
- es
|
8 |
license:
|
9 |
- cc-by-sa-4.0
|
10 |
multilinguality:
|
11 |
- monolingual
|
|
|
12 |
size_categories:
|
13 |
- 10K<n<100K
|
14 |
source_datasets:
|
15 |
- original
|
16 |
+
task_categories:
|
17 |
+
- automatic-speech-recognition
|
18 |
+
task_ids: []
|
19 |
+
pretty_name: 'CIEMPIESS LIGHT CORPUS: Audio and Transcripts of Mexican Spanish Broadcast
|
20 |
+
Conversations.'
|
21 |
tags:
|
22 |
- ciempiess
|
23 |
- spanish
|
24 |
- mexican spanish
|
25 |
- ciempiess project
|
26 |
- ciempiess-unam project
|
27 |
+
dataset_info:
|
28 |
+
config_name: ciempiess_light
|
29 |
+
features:
|
30 |
+
- name: audio_id
|
31 |
+
dtype: string
|
32 |
+
- name: audio
|
33 |
+
dtype:
|
34 |
+
audio:
|
35 |
+
sampling_rate: 16000
|
36 |
+
- name: speaker_id
|
37 |
+
dtype: string
|
38 |
+
- name: gender
|
39 |
+
dtype: string
|
40 |
+
- name: duration
|
41 |
+
dtype: float32
|
42 |
+
- name: normalized_text
|
43 |
+
dtype: string
|
44 |
+
splits:
|
45 |
+
- name: train
|
46 |
+
num_bytes: 1665852411.075
|
47 |
+
num_examples: 16663
|
48 |
+
download_size: 1122395917
|
49 |
+
dataset_size: 1665852411.075
|
50 |
+
configs:
|
51 |
+
- config_name: ciempiess_light
|
52 |
+
data_files:
|
53 |
+
- split: train
|
54 |
+
path: ciempiess_light/train-*
|
55 |
+
default: true
|
56 |
---
|
57 |
|
58 |
|
ciempiess_light.py
DELETED
@@ -1,123 +0,0 @@
|
|
1 |
-
from collections import defaultdict
|
2 |
-
import os
|
3 |
-
import json
|
4 |
-
import csv
|
5 |
-
|
6 |
-
import datasets
|
7 |
-
|
8 |
-
_NAME="ciempiess_light"
|
9 |
-
_VERSION="1.0.0"
|
10 |
-
_AUDIO_EXTENSIONS=".flac"
|
11 |
-
|
12 |
-
_DESCRIPTION = """
|
13 |
-
The CIEMPIESS LIGHT is a corpus in Mexican Spanish destined to train acoustic models for the speech recognition task. The corpus was manually transcribed and it contains audio recordings from male and female speakers taken from radio shows.
|
14 |
-
"""
|
15 |
-
|
16 |
-
_CITATION = """
|
17 |
-
@misc{carlosmenaciempiesslight2017,
|
18 |
-
title={CIEMPIESS LIGHT CORPUS: Audio and Transcripts of Mexican Spanish Broadcast Conversations.},
|
19 |
-
ldc_catalog_no={LDC2017S23},
|
20 |
-
DOI={https://doi.org/10.35111/64rg-yk97},
|
21 |
-
author={Hernandez Mena, Carlos Daniel and Herrera, Abel},
|
22 |
-
journal={Linguistic Data Consortium, Philadelphia},
|
23 |
-
year={2017},
|
24 |
-
url={https://catalog.ldc.upenn.edu/LDC2017S23},
|
25 |
-
}
|
26 |
-
"""
|
27 |
-
|
28 |
-
_HOMEPAGE = "https://catalog.ldc.upenn.edu/LDC2017S23"
|
29 |
-
|
30 |
-
_LICENSE = "CC-BY-SA-4.0, See https://creativecommons.org/licenses/by-sa/4.0/"
|
31 |
-
|
32 |
-
_BASE_DATA_DIR = "corpus/"
|
33 |
-
_METADATA_TRAIN = os.path.join(_BASE_DATA_DIR,"files", "metadata_train.tsv")
|
34 |
-
|
35 |
-
_TARS_TRAIN = os.path.join(_BASE_DATA_DIR,"files", "tars_train.paths")
|
36 |
-
|
37 |
-
class CiempiessLightConfig(datasets.BuilderConfig):
|
38 |
-
"""BuilderConfig for CIEMPIESS LIGHT Corpus"""
|
39 |
-
|
40 |
-
def __init__(self, name, **kwargs):
|
41 |
-
name=_NAME
|
42 |
-
super().__init__(name=name, **kwargs)
|
43 |
-
|
44 |
-
class CiempiessLight(datasets.GeneratorBasedBuilder):
|
45 |
-
"""CIEMPIESS LIGHT Corpus"""
|
46 |
-
|
47 |
-
VERSION = datasets.Version(_VERSION)
|
48 |
-
BUILDER_CONFIGS = [
|
49 |
-
CiempiessLightConfig(
|
50 |
-
name=_NAME,
|
51 |
-
version=datasets.Version(_VERSION),
|
52 |
-
)
|
53 |
-
]
|
54 |
-
|
55 |
-
def _info(self):
|
56 |
-
features = datasets.Features(
|
57 |
-
{
|
58 |
-
"audio_id": datasets.Value("string"),
|
59 |
-
"audio": datasets.Audio(sampling_rate=16000),
|
60 |
-
"speaker_id": datasets.Value("string"),
|
61 |
-
"gender": datasets.Value("string"),
|
62 |
-
"duration": datasets.Value("float32"),
|
63 |
-
"normalized_text": datasets.Value("string"),
|
64 |
-
}
|
65 |
-
)
|
66 |
-
return datasets.DatasetInfo(
|
67 |
-
description=_DESCRIPTION,
|
68 |
-
features=features,
|
69 |
-
homepage=_HOMEPAGE,
|
70 |
-
license=_LICENSE,
|
71 |
-
citation=_CITATION,
|
72 |
-
)
|
73 |
-
|
74 |
-
def _split_generators(self, dl_manager):
|
75 |
-
|
76 |
-
metadata_train=dl_manager.download_and_extract(_METADATA_TRAIN)
|
77 |
-
|
78 |
-
tars_train=dl_manager.download_and_extract(_TARS_TRAIN)
|
79 |
-
|
80 |
-
hash_tar_files=defaultdict(dict)
|
81 |
-
|
82 |
-
with open(tars_train,'r') as f:
|
83 |
-
hash_tar_files['train']=[path.replace('\n','') for path in f]
|
84 |
-
|
85 |
-
hash_meta_paths={"train":metadata_train}
|
86 |
-
audio_paths = dl_manager.download(hash_tar_files)
|
87 |
-
|
88 |
-
splits=["train"]
|
89 |
-
local_extracted_audio_paths = (
|
90 |
-
dl_manager.extract(audio_paths) if not dl_manager.is_streaming else
|
91 |
-
{
|
92 |
-
split:[None] * len(audio_paths[split]) for split in splits
|
93 |
-
}
|
94 |
-
)
|
95 |
-
|
96 |
-
return [
|
97 |
-
datasets.SplitGenerator(
|
98 |
-
name=datasets.Split.TRAIN,
|
99 |
-
gen_kwargs={
|
100 |
-
"audio_archives": [dl_manager.iter_archive(archive) for archive in audio_paths["train"]],
|
101 |
-
"local_extracted_archives_paths": local_extracted_audio_paths["train"],
|
102 |
-
"metadata_paths": hash_meta_paths["train"],
|
103 |
-
}
|
104 |
-
),
|
105 |
-
]
|
106 |
-
|
107 |
-
def _generate_examples(self, audio_archives, local_extracted_archives_paths, metadata_paths):
|
108 |
-
|
109 |
-
features = ["speaker_id","gender","duration","normalized_text"]
|
110 |
-
|
111 |
-
with open(metadata_paths) as f:
|
112 |
-
metadata = {x["audio_id"]: x for x in csv.DictReader(f, delimiter="\t")}
|
113 |
-
|
114 |
-
for audio_archive, local_extracted_archive_path in zip(audio_archives, local_extracted_archives_paths):
|
115 |
-
for audio_filename, audio_file in audio_archive:
|
116 |
-
audio_id = audio_filename.split(os.sep)[-1].split(_AUDIO_EXTENSIONS)[0]
|
117 |
-
path = os.path.join(local_extracted_archive_path, audio_filename) if local_extracted_archive_path else audio_filename
|
118 |
-
|
119 |
-
yield audio_id, {
|
120 |
-
"audio_id": audio_id,
|
121 |
-
**{feature: metadata[audio_id][feature] for feature in features},
|
122 |
-
"audio": {"path": path, "bytes": audio_file.read()},
|
123 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
corpus/speech/train.tar.gz → ciempiess_light/train-00000-of-00004.parquet
RENAMED
@@ -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:bb6bbdd1755bba0994016d608feb82e25f3f03659754f771aed75bad529d45f7
|
3 |
+
size 373303582
|
ciempiess_light/train-00001-of-00004.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:996b4e3a8fdd64c04c51b39336bb0e32fa884f3cbc264b4d3e632446e97ceeb5
|
3 |
+
size 290303316
|
ciempiess_light/train-00002-of-00004.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:722097e1eb9fa1b3699a1f15bea27cd7f56a3e5730bacd0c33a0426a26c25677
|
3 |
+
size 236296791
|
ciempiess_light/train-00003-of-00004.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e72cc33b7f45d87aa252c6bd207a63e3769373ba05e80983833c5eb15c460f53
|
3 |
+
size 222492228
|
corpus/files/metadata_train.tsv
DELETED
The diff for this file is too large to render.
See raw diff
|
|
corpus/files/tars_train.paths
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
corpus/speech/train.tar.gz
|
|
|
|