j-krzywdziak commited on
Commit
f8cb801
1 Parent(s): 9380af7

initial commit

Browse files
Files changed (8) hide show
  1. README.md +146 -0
  2. l1/test/test.zip +3 -0
  3. l1/train/train.zip +3 -0
  4. l2/test/test.zip +3 -0
  5. l2/train/train.zip +3 -0
  6. test.tsv +4 -0
  7. test2.py +122 -0
  8. train.tsv +4 -0
README.md ADDED
@@ -0,0 +1,146 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - expert-generated
4
+ language:
5
+ - pl
6
+ license:
7
+ - mit
8
+ multilinguality:
9
+ - monolingual
10
+
11
+ dataset_info:
12
+ - config_name: config
13
+ features:
14
+ - name: audio_id
15
+ dtype: string
16
+ - name: audio
17
+ dtype:
18
+ audio:
19
+ sampling_rate: 16000
20
+ - name: text
21
+ dtype: string
22
+ ---
23
+
24
+
25
+ # Dataset Card for [Dataset Name]
26
+
27
+ ## Table of Contents
28
+ - [Table of Contents](#table-of-contents)
29
+ - [Dataset Description](#dataset-description)
30
+ - [Dataset Summary](#dataset-summary)
31
+ - [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
32
+ - [Languages](#languages)
33
+ - [Dataset Structure](#dataset-structure)
34
+ - [Data Instances](#data-instances)
35
+ - [Data Fields](#data-fields)
36
+ - [Data Splits](#data-splits)
37
+ - [Dataset Creation](#dataset-creation)
38
+ - [Curation Rationale](#curation-rationale)
39
+ - [Source Data](#source-data)
40
+ - [Annotations](#annotations)
41
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
42
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
43
+ - [Social Impact of Dataset](#social-impact-of-dataset)
44
+ - [Discussion of Biases](#discussion-of-biases)
45
+ - [Other Known Limitations](#other-known-limitations)
46
+ - [Additional Information](#additional-information)
47
+ - [Dataset Curators](#dataset-curators)
48
+ - [Licensing Information](#licensing-information)
49
+ - [Citation Information](#citation-information)
50
+ - [Contributions](#contributions)
51
+
52
+ ## Dataset Description
53
+
54
+ - **Homepage:**
55
+ - **Repository:**
56
+ - **Paper:**
57
+ - **Leaderboard:**
58
+ - **Point of Contact:**
59
+
60
+ ### Dataset Summary
61
+
62
+ [More Information Needed]
63
+
64
+ ### Supported Tasks and Leaderboards
65
+
66
+ [More Information Needed]
67
+
68
+ ### Languages
69
+
70
+ [More Information Needed]
71
+
72
+ ## Dataset Structure
73
+
74
+ ### Data Instances
75
+
76
+ [More Information Needed]
77
+
78
+ ### Data Fields
79
+
80
+ [More Information Needed]
81
+
82
+ ### Data Splits
83
+
84
+ [More Information Needed]
85
+
86
+ ## Dataset Creation
87
+
88
+ ### Curation Rationale
89
+
90
+ [More Information Needed]
91
+
92
+ ### Source Data
93
+
94
+ #### Initial Data Collection and Normalization
95
+
96
+ [More Information Needed]
97
+
98
+ #### Who are the source language producers?
99
+
100
+ [More Information Needed]
101
+
102
+ ### Annotations
103
+
104
+ #### Annotation process
105
+
106
+ [More Information Needed]
107
+
108
+ #### Who are the annotators?
109
+
110
+ [More Information Needed]
111
+
112
+ ### Personal and Sensitive Information
113
+
114
+ [More Information Needed]
115
+
116
+ ## Considerations for Using the Data
117
+
118
+ ### Social Impact of Dataset
119
+
120
+ [More Information Needed]
121
+
122
+ ### Discussion of Biases
123
+
124
+ [More Information Needed]
125
+
126
+ ### Other Known Limitations
127
+
128
+ [More Information Needed]
129
+
130
+ ## Additional Information
131
+
132
+ ### Dataset Curators
133
+
134
+ [More Information Needed]
135
+
136
+ ### Licensing Information
137
+
138
+ [More Information Needed]
139
+
140
+ ### Citation Information
141
+
142
+ [More Information Needed]
143
+
144
+ ### Contributions
145
+
146
+ Thanks to [@github-username](https://github.com/<github-username>) for adding this dataset.
l1/test/test.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9c2f80675f1ddc98cc06bbb1b2eb5df896779b78daf921bb9ee193dc8db1ffb0
3
+ size 48701
l1/train/train.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5db01bf7e7b91e3a1ce5adbbc03488f744c68efe5c92b4c18585224e13614ffd
3
+ size 48709
l2/test/test.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9c2f80675f1ddc98cc06bbb1b2eb5df896779b78daf921bb9ee193dc8db1ffb0
3
+ size 48701
l2/train/train.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5db01bf7e7b91e3a1ce5adbbc03488f744c68efe5c92b4c18585224e13614ffd
3
+ size 48709
test.tsv ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ audio_id ngram
2
+ common_voice_pl_20547774.wav poślemytest
3
+ common_voice_pl_20547775.wav poślemy potest
4
+ common_voice_pl_20547775.wav poślemy po wastest
test2.py ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ # coding=utf-8
3
+ # Lint as: python3
4
+ """test set"""
5
+
6
+
7
+ import csv
8
+ import os
9
+ import json
10
+
11
+ import datasets
12
+ from datasets.utils.py_utils import size_str
13
+ from tqdm import tqdm
14
+
15
+
16
+ _CITATION = """\
17
+ @inproceedings{panayotov2015librispeech,
18
+ title={Librispeech: an ASR corpus based on public domain audio books},
19
+ author={Panayotov, Vassil and Chen, Guoguo and Povey, Daniel and Khudanpur, Sanjeev},
20
+ booktitle={Acoustics, Speech and Signal Processing (ICASSP), 2015 IEEE International Conference on},
21
+ pages={5206--5210},
22
+ year={2015},
23
+ organization={IEEE}
24
+ }
25
+ """
26
+
27
+ _DESCRIPTION = """\
28
+ Lorem ipsum
29
+ """
30
+
31
+
32
+ _BASE_URL = "https://huggingface.co/datasets/j-krzywdziak/test/tree/main"
33
+ _DATA_URL = "https://huggingface.co/datasets/j-krzywdziak/test/blob/main/dev.tar.gz"
34
+ _PROMPTS_URLS = "https://huggingface.co/datasets/j-krzywdziak/test/blob/main/dev.tsv"
35
+
36
+ logger = datasets.logging.get_logger(__name__)
37
+
38
+ class TestConfig(datasets.BuilderConfig):
39
+ """Lorem impsum."""
40
+
41
+ def __init__(self, name, version, **kwargs):
42
+ # self.language = kwargs.pop("language", None)
43
+ # self.release_date = kwargs.pop("release_date", None)
44
+ # self.num_clips = kwargs.pop("num_clips", None)
45
+ # self.num_speakers = kwargs.pop("num_speakers", None)
46
+ # self.validated_hr = kwargs.pop("validated_hr", None)
47
+ # self.total_hr = kwargs.pop("total_hr", None)
48
+ # self.size_bytes = kwargs.pop("size_bytes", None)
49
+ # self.size_human = size_str(self.size_bytes)
50
+ description = (
51
+ f"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor "
52
+ f"incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud "
53
+ f"exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure "
54
+ f"dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. "
55
+ f"Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt "
56
+ f"mollit anim id est laborum."
57
+ )
58
+ super(TestConfig, self).__init__(
59
+ name=name,
60
+ version=datasets.Version(version),
61
+ description=description,
62
+ **kwargs,
63
+ )
64
+
65
+ class TestASR(datasets.GeneratorBasedBuilder):
66
+ """Lorem ipsum."""
67
+ DEFAULT_CONFIG_NAME = "all"
68
+
69
+ BUILDER_CONFIGS = [
70
+ TestConfig(
71
+ name="Test Dataset",
72
+ version="0.0.0",
73
+ )
74
+ ]
75
+
76
+ def _info(self):
77
+ return datasets.DatasetInfo(
78
+ description=_DESCRIPTION,
79
+ features=datasets.Features(
80
+ {
81
+ "audio_id": datasets.Value("string"),
82
+ "audio": datasets.Audio(sampling_rate=16_000),
83
+ "ngram": datasets.Value("string")
84
+ }
85
+ ),
86
+ supervised_keys=None,
87
+ homepage=_BASE_URL,
88
+ citation=_CITATION
89
+ )
90
+
91
+ def _split_generators(self, dl_manager):
92
+ archive_path = dl_manager.download(_DATA_URL)
93
+ # (Optional) In non-streaming mode, we can extract the archive locally to have actual local audio files:
94
+ local_extracted_archive = dl_manager.extract(archive_path) if not dl_manager.is_streaming else {}
95
+ meta_path = dl_manager.download_and_extract(_PROMPTS_URLS)
96
+ return [datasets.SplitGenerator(
97
+ name=datasets.Split.TEST,
98
+ gen_kwargs={
99
+ "meta_path": meta_path,
100
+ "audio_files": dl_manager.iter_archive(local_extracted_archive)
101
+ }
102
+ )]
103
+
104
+ def _generate_examples(self, meta_path, audio_files):
105
+ """Lorem ipsum."""
106
+ metadata = {}
107
+ with open(meta_path, encoding="utf-8") as f:
108
+ for row in f:
109
+ r = row.split(r"\t")
110
+ audio_id = r[0]
111
+ ngram = r[1]
112
+ metadata[audio_id] = {"audio_id": audio_id,
113
+ "ngram": ngram}
114
+
115
+ inside_clips_dir = True
116
+ id_ = 0
117
+ for path, f in audio_files:
118
+ _, audio_name = os.path.split(path)
119
+ if audio_name in metadata:
120
+ audio = {"bytes": f.read()}
121
+ yield id_, {**metadata[audio_id], "audio": audio}
122
+ id_ +=1
train.tsv ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ audio_id ngram
2
+ common_voice_pl_20547774.wav poślemytrain
3
+ common_voice_pl_20547775.wav poślemy potrain
4
+ common_voice_pl_20547775.wav poślemy po wastrain