Skip to content

Commit

Permalink
Fixed small bug with NoisePerturbationWithNormalization (#7118)
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Egert <[email protected]>
Signed-off-by: jubick1337 <[email protected]>
  • Loading branch information
trias702 authored and jubick1337 committed Aug 8, 2023
1 parent f32f675 commit b13d3ff
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 ref_mic is None 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 b13d3ff

Please sign in to comment.