BrunoHays commited on
Commit
6af2ce1
·
1 Parent(s): 5d832fb

Update ESLO.py

Browse files
Files changed (1) hide show
  1. ESLO.py +5 -5
ESLO.py CHANGED
@@ -356,7 +356,6 @@ class ESLO(datasets.GeneratorBasedBuilder):
356
  -------
357
  A NumPy array containing the audio waveform, in float32 dtype.
358
  """
359
- print(file)
360
  try:
361
  # This launches a subprocess to decode audio while down-mixing and resampling as necessary.
362
  # Requires the ffmpeg CLI and `ffmpeg-python` package to be installed.
@@ -379,14 +378,15 @@ class ESLO(datasets.GeneratorBasedBuilder):
379
  overlap=utterance1.overlap or utterance2.overlap
380
  )
381
 
382
- def _merged_utterances_iterator(self, utterance_iterator):
 
383
  if self.config.single_samples:
384
- yield from utterance_iterator
385
- merged_utterance = next(iter(utterance_iterator))
386
  start_time = merged_utterance.start_timestamp
387
  while True:
388
  try:
389
- new_utterance = next(utterance_iterator)
390
  except StopIteration:
391
  yield merged_utterance
392
  break
 
356
  -------
357
  A NumPy array containing the audio waveform, in float32 dtype.
358
  """
 
359
  try:
360
  # This launches a subprocess to decode audio while down-mixing and resampling as necessary.
361
  # Requires the ffmpeg CLI and `ffmpeg-python` package to be installed.
 
378
  overlap=utterance1.overlap or utterance2.overlap
379
  )
380
 
381
+ def _merged_utterances_iterator(self, utterances: List):
382
+ utterances = iter(utterances)
383
  if self.config.single_samples:
384
+ yield from utterances
385
+ merged_utterance = next(utterances)
386
  start_time = merged_utterance.start_timestamp
387
  while True:
388
  try:
389
+ new_utterance = next(utterances)
390
  except StopIteration:
391
  yield merged_utterance
392
  break