spafe.utils.filters#

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

(numpy.ndarray)

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
  • scale (str) – type of scaling.

  • nfilts (int) – number of filters.

Returns

scaling vector.

Return type

(numpy.ndarray)

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} \]