diff --git a/scripts/speech_recognition/convert_hf_dataset_to_nemo.py b/scripts/speech_recognition/convert_hf_dataset_to_nemo.py index 8445a8f11754..aa29bcc1620b 100644 --- a/scripts/speech_recognition/convert_hf_dataset_to_nemo.py +++ b/scripts/speech_recognition/convert_hf_dataset_to_nemo.py @@ -208,7 +208,7 @@ def map_dataset_to_nemo(batch): soundfile.write(audio_filepath, batch['audio']['array'], samplerate=cfg.sampling_rate, format='wav') - batch['duration'] = librosa.get_duration(batch['audio']['array'], sr=batch['audio']['sampling_rate']) + batch['duration'] = librosa.get_duration(y=batch['audio']['array'], sr=batch['audio']['sampling_rate']) return batch return map_dataset_to_nemo