pyampact.speechDescriptorsUtils.compute_tqwt_features
- pyampact.speechDescriptorsUtils.compute_tqwt_features(y, sr, Q=1.0, r=3.0, J=8, n_keep=5)[source]
Compute a fixed-width feature vector from the Tunable Q-factor Wavelet Transform (TQWT). Features are derived from subband energies of the TQWT decomposition of a 1-D signal.
- Parameters:
y (1D numpy array) – input signal
sr (float) – sample rate of the signal in Hz. (Currently unused; included for API consistency.)
Q (float) – Q-factor controlling oscillatory behavior of the wavelets; default = 1.0
r (float) – redundancy factor of the TQWT; default = 3.0
J (int) – number of TQWT decomposition levels; default = 8
n_keep (int) – number of lowest-index subband log-energies to return; default = 5
- Returns:
features – Feature vector containing, in order:
- tqwt_e1 .. tqwt_e{n_keep}float
Log10 subband energies of the first n_keep TQWT bands.
- tqwt_entropyfloat
Normalized Shannon entropy of the subband energy distribution.
- tqwt_centroidfloat
Energy-weighted centroid of subband indices.
- tqwt_low_high_ratiofloat
Ratio of summed low-band energy to high-band energy.
If insufficient valid data are available, all features are returned as NaN.
- Return type:
list of float