patrickvonplaten commited on
Commit
997cc70
1 Parent(s): d30bdd1

Update librispeech_asr_demo.py

Browse files
Files changed (1) hide show
  1. librispeech_asr_demo.py +1 -1
librispeech_asr_demo.py CHANGED
@@ -118,7 +118,7 @@ class LibrispeechASR(datasets.GeneratorBasedBuilder):
118
  def _generate_examples(self, archive_path, split_name):
119
  """Generate examples from a Librispeech archive_path."""
120
  transcripts_glob = os.path.join(archive_path, split_name, "*/*/*.txt")
121
- for transcript_file in glob.glob(transcripts_glob):
122
  path = os.path.dirname(transcript_file)
123
  with open(os.path.join(path, transcript_file)) as f:
124
  for line in f:
 
118
  def _generate_examples(self, archive_path, split_name):
119
  """Generate examples from a Librispeech archive_path."""
120
  transcripts_glob = os.path.join(archive_path, split_name, "*/*/*.txt")
121
+ for transcript_file in sorted(glob.glob(transcripts_glob)):
122
  path = os.path.dirname(transcript_file)
123
  with open(os.path.join(path, transcript_file)) as f:
124
  for line in f: