Skip to content

Commit

Permalink
Fixed scalar index bug in perturb
Browse files Browse the repository at this point in the history
  • Loading branch information
trias702 committed Jul 28, 2023
1 parent 784866e commit 1011d7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nemo/collections/asr/parts/preprocessing/perturb.py
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ def perturb_with_input_noise(self, data, noise, data_rms=None, ref_mic=0, norm_t
else:
snr_db = random.uniform(self._min_snr_db, self._max_snr_db)
if data_rms is None:
data_rms = data.rms_db if isinstance(data.rms_db, float) else data.rms_db[ref_mic]
data_rms = data.rms_db[ref_mic] if isinstance(data.rms_db, (list, np.ndarray)) else data.rms_db

if norm_to_db is None:
norm_to_db = data_rms
Expand Down

0 comments on commit 1011d7f

Please sign in to comment.