mindspore.dataset.audio.linear_fbanks
- mindspore.dataset.audio.linear_fbanks(n_freqs, f_min, f_max, n_filter, sample_rate)[source]
Creates a linear triangular filterbank.
- Parameters
- Returns
numpy.ndarray, the linear triangular filterbank.
- Raises
TypeError – If n_freqs is not of type int.
ValueError – If n_freqs is negative.
TypeError – If f_min is not of type float.
ValueError – If f_min is negative.
TypeError – If f_max is not of type float.
ValueError – If f_max is negative.
ValueError – If f_min is larger than f_max.
TypeError – If n_filter is not of type int.
ValueError – If n_filter is not positive.
TypeError – If sample_rate is not of type int.
ValueError – If sample_rate is not positive.
- Supported Platforms:
CPU
Examples
>>> from mindspore.dataset.audio import linear_fbanks >>> >>> fbanks = linear_fbanks(n_freqs=4096, f_min=0, f_max=8000, n_filter=40, sample_rate=16000)