Loyage
commited on
Commit
·
d6ebcf6
1
Parent(s):
2a64826
init test
Browse files- .gitignore +3 -0
- data/20240730-Aldrine.tar +3 -0
- data/metadata.tsv +0 -0
- release_stats.py +11 -0
- startimes_luganda_recording.py +84 -0
.gitignore
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
/missions_txt/
|
2 |
+
*.ipynb
|
3 |
+
/tmp_data/
|
data/20240730-Aldrine.tar
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:772bc03715af96989f5144f1acafa5003ffc11dd12dc7689e78c1b282c17a59c
|
3 |
+
size 1361870848
|
data/metadata.tsv
ADDED
The diff for this file is too large to render.
See raw diff
|
|
release_stats.py
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
STATS = {
|
2 |
+
"name": "Startimes-Luganda_Recording",
|
3 |
+
"version": "1.0.0",
|
4 |
+
"date": "2024-09-01",
|
5 |
+
"locales": {
|
6 |
+
"_all_": {'reportedSentences': 7815, 'duration': 1, 'clips': 1, 'users': 416, 'size': 1,
|
7 |
+
'avgDurationSecs': 1, 'totalHrs': 1},
|
8 |
+
},
|
9 |
+
'totalDuration': 1, 'totalHrs': 1
|
10 |
+
}
|
11 |
+
|
startimes_luganda_recording.py
ADDED
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import datasets
|
2 |
+
from .release_stats import STATS
|
3 |
+
|
4 |
+
# _DATASET_DICT = {'Aldrine': ['20240730', '20240801', '20240805'], 'Nabbuto': ['20240730', '20240801'], 'Nakawunde': ['20240730'], 'Namala': ['20240730', '20240807'], 'Solomon': ['20240805'], 'William': ['20240730']}
|
5 |
+
_DATASET_DICT = {'Aldrine': ['20240730']}
|
6 |
+
|
7 |
+
_HOMEPAGE = "https://huggingface.co/Loyage/startimes_luganda_recording"
|
8 |
+
|
9 |
+
_DATA_URL = "https://huggingface.co/datasets/Loyage/startimes_luganda_recording/resolve/main/data"
|
10 |
+
|
11 |
+
class StartimesLugandaRecordingConfig():
|
12 |
+
"""BuilderConfig for StartimesLugandaRecording."""
|
13 |
+
|
14 |
+
def __init__(self, name, version, **kwargs):
|
15 |
+
self.language = "Luganda"
|
16 |
+
|
17 |
+
description = (
|
18 |
+
f"Luganda Speaking Voice Datasets recorded by Startimes. "
|
19 |
+
f"All rights reserved by Startimes. "
|
20 |
+
)
|
21 |
+
|
22 |
+
super(StartimesLugandaRecordingConfig, self).__init__(
|
23 |
+
name=name,
|
24 |
+
version=datasets.Version(version),
|
25 |
+
description=description,
|
26 |
+
**kwargs,
|
27 |
+
)
|
28 |
+
|
29 |
+
|
30 |
+
class StartimesLugandaRecording(datasets.GeneratorBasedBuilder):
|
31 |
+
BUILDER_CONFIGS = [
|
32 |
+
StartimesLugandaRecordingConfig(
|
33 |
+
name="Luganda",
|
34 |
+
version="1.0.0",
|
35 |
+
)
|
36 |
+
]
|
37 |
+
|
38 |
+
def _info(self):
|
39 |
+
return datasets.DatasetInfo(
|
40 |
+
description="Luganda Speaking Voice Datasets recorded by Startimes. All rights reserved by Startimes.",
|
41 |
+
features=datasets.Features(
|
42 |
+
{
|
43 |
+
"path": datasets.Value("string"),
|
44 |
+
"sentence": datasets.Value("string"),
|
45 |
+
"speaker": datasets.Value("string"),
|
46 |
+
}
|
47 |
+
)
|
48 |
+
|
49 |
+
def _split_generators(self, dl_manager):
|
50 |
+
dl_manager.download_config.ignore_url_params = True
|
51 |
+
# audio_path = {}
|
52 |
+
local_extracted_archive = {}
|
53 |
+
metadata_path = dl_manager.download(f"{_DATA_URL}/metadata.tsv")
|
54 |
+
|
55 |
+
for speaker, dates in _DATASET_DICT.items():
|
56 |
+
speaker_audios = []
|
57 |
+
for date in dates:
|
58 |
+
speaker_audios.append(dl_manager.download_and_extract(f"{_DATA_URL}/{date}-{speaker}.tar"))
|
59 |
+
local_extracted_archive[speaker] = speaker_audios
|
60 |
+
|
61 |
+
return [
|
62 |
+
datasets.SplitGenerator(
|
63 |
+
name=datasets.Split.TRAIN,
|
64 |
+
gen_kwargs={
|
65 |
+
"metadata_path": metadata_path,
|
66 |
+
"local_extracted_archive": local_extracted_archive,
|
67 |
+
},
|
68 |
+
)
|
69 |
+
]
|
70 |
+
|
71 |
+
def _generate_examples(
|
72 |
+
self,
|
73 |
+
local_extracted_archive,
|
74 |
+
audio_files,
|
75 |
+
metadata_path,
|
76 |
+
path_to_clips,
|
77 |
+
):
|
78 |
+
yield {
|
79 |
+
"path": path_to_clips,
|
80 |
+
"sentence": "Hello, how are you?",
|
81 |
+
"speaker": "Aldrine",
|
82 |
+
}
|
83 |
+
|
84 |
+
|