Fix issue generating split on Windows

#2
Files changed (1) hide show
  1. 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")