Commit
•
ce4e32f
1
Parent(s):
238d5b8
Fix issue generating split on Windows (#2)
Browse files- Fix issue generating split on Windows (7d55b8364d33d9d41c7da0efad295319ff1469d4)
Co-authored-by: xacer <[email protected]>
- libri_light.py +1 -1
libri_light.py
CHANGED
@@ -147,7 +147,7 @@ class LibriLight(datasets.GeneratorBasedBuilder):
|
|
147 |
def _generate_examples(self, archive_path):
|
148 |
paths = glob.glob(os.path.join(archive_path, self.config.name, "**", "**", "*.flac"))
|
149 |
for key, path in enumerate(paths):
|
150 |
-
path_split = path.split(
|
151 |
id_ = path_split[-1].replace(".flac", "")
|
152 |
speaker_id = int(path_split[-3])
|
153 |
path_json = path.replace(".flac", ".json")
|
|
|
147 |
def _generate_examples(self, archive_path):
|
148 |
paths = glob.glob(os.path.join(archive_path, self.config.name, "**", "**", "*.flac"))
|
149 |
for key, path in enumerate(paths):
|
150 |
+
path_split = path.split(os.path.sep)
|
151 |
id_ = path_split[-1].replace(".flac", "")
|
152 |
speaker_id = int(path_split[-3])
|
153 |
path_json = path.replace(".flac", ".json")
|