Update ESLO.py
Browse files
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,
|
|
|
383 |
if self.config.single_samples:
|
384 |
-
yield from
|
385 |
-
merged_utterance = next(
|
386 |
start_time = merged_utterance.start_timestamp
|
387 |
while True:
|
388 |
try:
|
389 |
-
new_utterance = next(
|
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
|