Add explicit kwarg name to _freq_to_index to avoid confusion

This commit is contained in:
mbsantiago 2025-11-16 23:57:11 +00:00
parent a4498cfd83
commit bdb9e18964

View File

@ -146,14 +146,18 @@ class FrequencyCrop(torch.nn.Module):
low_index = None
if min_freq is not None:
low_index = _frequency_to_index(
min_freq, self.samplerate, self.n_fft
min_freq,
n_fft=self.n_fft,
samplerate=self.samplerate,
)
self.low_index = low_index
high_index = None
if max_freq is not None:
high_index = _frequency_to_index(
max_freq, self.samplerate, self.n_fft
max_freq,
n_fft=self.n_fft,
samplerate=self.samplerate,
)
self.high_index = high_index