torchaudio.functional.linear_fbanks¶
- torchaudio.functional.linear_fbanks(n_freqs: int, f_min: float, f_max: float, n_filter: int, sample_rate: int) Tensor [source]¶
Creates a linear triangular filterbank.
Note
For the sake of the numerical compatibility with librosa, not all the coefficients in the resulting filter bank has magnitude of 1.
- Parameters:
- Returns:
Triangular filter banks (fb matrix) of size (
n_freqs
,n_filter
) meaning number of frequencies to highlight/apply to x the number of filterbanks. Each column is a filterbank so that assuming there is a matrix A of size (…,n_freqs
), the applied result would beA * linear_fbanks(A.size(-1), ...)
.- Return type:
Tensor