We use cookies on this website to distinguish you from other users.
We use this data to improve our content experience and for targeted advertising.
By continuing to use this website you consent to our use of cookies.
For more information, please see our
Cookie Policy.
spafe.utils.filters#
Description : Filter utils implementation.
Copyright (c) 2019-2024 Ayoub Malek. This source code is licensed under the terms of the BSD 3-Clause License. For a copy, see <https://github.com/SuperKogito/spafe/blob/master/LICENSE>.
- spafe.utils.filters.rasta_filter(x: ndarray) ndarray [source]#
Implementing the RASTA filter as in [Ellis-plp].
- Parameters
x (numpy.ndarray) – input signal.
- Returns
filtered signal.
- Return type
Note
default filter is single pole at 0.94
rows of x = number of frames
cols of x = critical bands
- spafe.utils.filters.scale_fbank(scale: typing_extensions.Literal[ascendant, descendant, constant], nfilts: int) ndarray [source]#
Generate scaling vector.
- Parameters
- Returns
scaling vector.
- Return type
Note
\[ \begin{align}\begin{aligned}ascendant : \frac{1}{nfilts} \times [ 1, ..., i, ..., nfilts]\\descendant : \frac{1}{nfilts} \times [ nfilts, ..., i, ..., 1]\end{aligned}\end{align} \]