carlosdanielhernandezmena commited on
Commit
c9c42dc
1 Parent(s): e23e535
README.md CHANGED
@@ -1,3 +1,34 @@
1
  ---
2
  license: cc-by-sa-4.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
1
  ---
2
  license: cc-by-sa-4.0
3
+ dataset_info:
4
+ config_name: librivox_spanish
5
+ features:
6
+ - name: audio_id
7
+ dtype: string
8
+ - name: audio
9
+ dtype:
10
+ audio:
11
+ sampling_rate: 16000
12
+ - name: speaker_id
13
+ dtype: string
14
+ - name: speaker_group
15
+ dtype: string
16
+ - name: gender
17
+ dtype: string
18
+ - name: duration
19
+ dtype: float32
20
+ - name: normalized_text
21
+ dtype: string
22
+ splits:
23
+ - name: train
24
+ num_bytes: 6481120844.144
25
+ num_examples: 36338
26
+ download_size: 5089499872
27
+ dataset_size: 6481120844.144
28
+ configs:
29
+ - config_name: librivox_spanish
30
+ data_files:
31
+ - split: train
32
+ path: librivox_spanish/train-*
33
+ default: true
34
  ---
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,3 +0,0 @@
1
- corpus/speech/train/non_native.tar.gz
2
- corpus/speech/train/native/female.tar.gz
3
- corpus/speech/train/native/male.tar.gz
 
 
 
 
librivox_spanish.py DELETED
@@ -1,124 +0,0 @@
1
- from collections import defaultdict
2
- import os
3
- import json
4
- import csv
5
- import datasets
6
-
7
- _NAME="librivox_spanish"
8
- _VERSION="1.0.0"
9
-
10
- _DESCRIPTION = """
11
- The LIBRIVOX SPANISH CORPUS has a duration of 73 hours and it is constituted by audio
12
- files between 3 and 10 seconds long, manually segmented. Transcription are also manually
13
- made by Spanish native speakers.
14
- """
15
-
16
- _CITATION = """
17
- @misc{menalibrivoxspanish2020,
18
- title={LIBRIVOX SPANISH CORPUS: Audio and Transcripts in Spanish in a CIEMPIESS Corpus style, taken from Librivox.org},
19
- ldc_catalog_no={LDC2020S01},
20
- DOI={https://doi.org/10.35111/a44z-6x49},
21
- author={Hernandez Mena, Carlos Daniel},
22
- journal={Linguistic Data Consortium, Philadelphia},
23
- year={2020},
24
- url={https://catalog.ldc.upenn.edu/LDC2020S01},
25
- }
26
- """
27
-
28
- _HOMEPAGE = "https://catalog.ldc.upenn.edu/LDC2020S01"
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 LibrivoxSpanishConfig(datasets.BuilderConfig):
38
- """BuilderConfig for WIKIPEDIA SPANISH CORPUS"""
39
-
40
- def __init__(self, name, **kwargs):
41
- name=_NAME
42
- super().__init__(name=name, **kwargs)
43
-
44
- class LibrivoxSpanish(datasets.GeneratorBasedBuilder):
45
- """WIKIPEDIA SPANISH CORPUS"""
46
-
47
- VERSION = datasets.Version(_VERSION)
48
- BUILDER_CONFIGS = [
49
- LibrivoxSpanishConfig(
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
- "speaker_group": datasets.Value("string"),
62
- "gender": datasets.Value("string"),
63
- "duration": datasets.Value("float32"),
64
- "normalized_text": 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
-
79
- tars_train=dl_manager.download_and_extract(_TARS_TRAIN)
80
-
81
- hash_tar_files=defaultdict(dict)
82
-
83
- with open(tars_train,'r') as f:
84
- hash_tar_files['train']=[path.replace('\n','') for path in f]
85
-
86
- hash_meta_paths={"train":metadata_train}
87
- audio_paths = dl_manager.download(hash_tar_files)
88
-
89
- splits=["train"]
90
- local_extracted_audio_paths = (
91
- dl_manager.extract(audio_paths) if not dl_manager.is_streaming else
92
- {
93
- split:[None] * len(audio_paths[split]) for split in splits
94
- }
95
- )
96
-
97
- return [
98
- datasets.SplitGenerator(
99
- name=datasets.Split.TRAIN,
100
- gen_kwargs={
101
- "audio_archives": [dl_manager.iter_archive(archive) for archive in audio_paths["train"]],
102
- "local_extracted_archives_paths": local_extracted_audio_paths["train"],
103
- "metadata_paths": hash_meta_paths["train"],
104
- }
105
- ),
106
- ]
107
-
108
- def _generate_examples(self, audio_archives, local_extracted_archives_paths, metadata_paths):
109
-
110
- features = ["speaker_id","speaker_group","gender","duration","normalized_text"]
111
-
112
- with open(metadata_paths) as f:
113
- metadata = {x["audio_id"]: x for x in csv.DictReader(f, delimiter="\t")}
114
-
115
- for audio_archive, local_extracted_archive_path in zip(audio_archives, local_extracted_archives_paths):
116
- for audio_filename, audio_file in audio_archive:
117
- audio_id =os.path.splitext(os.path.basename(audio_filename))[0]
118
- path = os.path.join(local_extracted_archive_path, audio_filename) if local_extracted_archive_path else audio_filename
119
-
120
- yield audio_id, {
121
- "audio_id": audio_id,
122
- **{feature: metadata[audio_id][feature] for feature in features},
123
- "audio": {"path": path, "bytes": audio_file.read()},
124
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
corpus/speech/train/non_native.tar.gz → librivox_spanish/train-00000-of-00013.parquet RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:3d6a21010fe722624d9abed8df1e5f353c1e67dbd092bab0a4e34fc96ae3fa8d
3
- size 721444847
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:34ebce73fcbd1262619a02e6b3bf2d64ed22e96f8d2adcd338bba95d757b730e
3
+ size 491541049
corpus/speech/train/native/female.tar.gz → librivox_spanish/train-00001-of-00013.parquet RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:848f95907f3530f5a59bf8bd6c7a127b2d7b7d45b6f8eb8d36141ec806d8de8e
3
- size 2151825959
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:95f15e0031ea83d0cedf1ce241df8dbf895ecb3794c73c65e8deffb66a5c485c
3
+ size 442475423
corpus/speech/train/native/male.tar.gz → librivox_spanish/train-00002-of-00013.parquet RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:387f04b1576446f09c09a04e114d2ab7819ded8f4900547201a7fb6e4e646b1e
3
- size 2217369486
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2ca5478c95e6fc48835cf9e8ecb1d53ba1f7e40df22e66def65a80e4bf82c61c
3
+ size 408720297
librivox_spanish/train-00003-of-00013.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:429e836dd9958be8a0c1cc8844d019cff7b1f4075ea80659a12ed4e45eb283dd
3
+ size 392373954
librivox_spanish/train-00004-of-00013.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:84da0582be53dc5d9529c00bdbce48f3135f380ad6cecf4712d029b47a13cd24
3
+ size 373363563
librivox_spanish/train-00005-of-00013.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6e5424118a89f6186c387f7016f0ad2c42a08e52ab7d49375b394a93350c14e5
3
+ size 373150813
librivox_spanish/train-00006-of-00013.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:14fb09c8e303ac95130206b815dae75e311da940020712c83f397ab43d980989
3
+ size 395888404
librivox_spanish/train-00007-of-00013.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:772182cd428790714cfaac838d538e64766ffed1612ee8345f0420fae34e3fbf
3
+ size 405591411
librivox_spanish/train-00008-of-00013.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:47d87377ee7c21ec7b4fe57a72e698b47cad2d2527407f94a5d17dfa8aaea5c1
3
+ size 371365928
librivox_spanish/train-00009-of-00013.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1edd5c27169deca682fdde548af83dac9fbd0b989729594b38ae5c163444ce47
3
+ size 365495672
librivox_spanish/train-00010-of-00013.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b285db6629a4a42fe7e7c20bfeff27ebc3a16f8bf801b6549a2ff9cd02aad09f
3
+ size 325937271
librivox_spanish/train-00011-of-00013.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:52d23ddce490a97f8334c28c6cafde9bd53de550c9d567188e20141d7808106f
3
+ size 384305840
librivox_spanish/train-00012-of-00013.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fe03ee271989aba86105748f0f75214f6df051ab28a797f07e7537bf035b4fbd
3
+ size 359290247