diff --git a/nemo/collections/asr/models/label_models.py b/nemo/collections/asr/models/label_models.py index d8065d4919e4..aefa8743826b 100644 --- a/nemo/collections/asr/models/label_models.py +++ b/nemo/collections/asr/models/label_models.py @@ -427,9 +427,9 @@ def infer_file(self, path2audio_file): audio = librosa.core.resample(audio, orig_sr=sr, target_sr=target_sr) audio_length = audio.shape[0] device = self.device - audio = np.array(audio) + audio = np.array([audio]) audio_signal, audio_signal_len = ( - torch.tensor([audio], device=device), + torch.tensor(audio, device=device), torch.tensor([audio_length], device=device), ) mode = self.training