Datasets:
TenzinGayche
commited on
Commit
•
878fae4
1
Parent(s):
cf48bc4
wavpath issue fixed
Browse files- tibetan_voice.py +2 -2
tibetan_voice.py
CHANGED
@@ -105,7 +105,7 @@ class TibetanVoice(datasets.GeneratorBasedBuilder):
|
|
105 |
datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={"filepath": downloaded_files["valid"],"wavs":wavs,'wavfilepath':downloaded_wav}),
|
106 |
datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": downloaded_files["test"],"wavs":wavs,'wavfilepath':downloaded_wav}),
|
107 |
]
|
108 |
-
def _generate_examples(self, filepath, wavs):
|
109 |
|
110 |
"""This function returns the examples in the raw (text) form."""
|
111 |
example_map = {}
|
@@ -121,7 +121,7 @@ class TibetanVoice(datasets.GeneratorBasedBuilder):
|
|
121 |
audio_map = {}
|
122 |
for path, f in wavs:
|
123 |
_, filename = os.path.split(path)
|
124 |
-
audio_map[filename] = {"path": path, "bytes": f.read()}
|
125 |
|
126 |
for key, path in enumerate(example_map.keys()):
|
127 |
_, filename = os.path.split(path)
|
|
|
105 |
datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={"filepath": downloaded_files["valid"],"wavs":wavs,'wavfilepath':downloaded_wav}),
|
106 |
datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": downloaded_files["test"],"wavs":wavs,'wavfilepath':downloaded_wav}),
|
107 |
]
|
108 |
+
def _generate_examples(self, filepath, wavs,wavfilepath):
|
109 |
|
110 |
"""This function returns the examples in the raw (text) form."""
|
111 |
example_map = {}
|
|
|
121 |
audio_map = {}
|
122 |
for path, f in wavs:
|
123 |
_, filename = os.path.split(path)
|
124 |
+
audio_map[filename] = {"path": wavfilepath+'/'+path, "bytes": f.read()}
|
125 |
|
126 |
for key, path in enumerate(example_map.keys()):
|
127 |
_, filename = os.path.split(path)
|