Update czech_parliament_plenary_hearings.py
Browse files
czech_parliament_plenary_hearings.py
CHANGED
@@ -54,8 +54,10 @@ class CzechParliamentPlenaryHearings(GeneratorBasedBuilder):
|
|
54 |
split_generators = []
|
55 |
for split in splits:
|
56 |
split_generators.append(
|
57 |
-
|
58 |
-
|
|
|
|
|
59 |
)
|
60 |
return split_generators
|
61 |
|
@@ -70,7 +72,8 @@ class CzechParliamentPlenaryHearings(GeneratorBasedBuilder):
|
|
70 |
for entry2 in it2:
|
71 |
if entry2.is_file() and entry2.name.endswith('.wav'):
|
72 |
audio_file = entry2.name
|
73 |
-
audio_path = os.path.join(
|
|
|
74 |
transcription_path = os.path.join(
|
75 |
folder_path, audio_file + '.trn')
|
76 |
transcription = open(
|
@@ -82,4 +85,3 @@ class CzechParliamentPlenaryHearings(GeneratorBasedBuilder):
|
|
82 |
'audio': audio,
|
83 |
'transcription': transcription,
|
84 |
}
|
85 |
-
|
|
|
54 |
split_generators = []
|
55 |
for split in splits:
|
56 |
split_generators.append(
|
57 |
+
datasets.SplitGenerator(
|
58 |
+
name=split_names.get(split, split),
|
59 |
+
gen_kwargs={'split': split, 'data_dir': data_dir}
|
60 |
+
)
|
61 |
)
|
62 |
return split_generators
|
63 |
|
|
|
72 |
for entry2 in it2:
|
73 |
if entry2.is_file() and entry2.name.endswith('.wav'):
|
74 |
audio_file = entry2.name
|
75 |
+
audio_path = os.path.join(
|
76 |
+
folder_path, audio_file)
|
77 |
transcription_path = os.path.join(
|
78 |
folder_path, audio_file + '.trn')
|
79 |
transcription = open(
|
|
|
85 |
'audio': audio,
|
86 |
'transcription': transcription,
|
87 |
}
|
|