SPRAAK
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Functions
sspmod_ordstat.c File Reference

ordered statistics More...

Functions

void spr_ordstat_free (SprSspInfo *info)
 
int spr_ordstat_setup (SprSspInfo *info, const char **descript, void *aux_info)
 
int spr_ordstat_process (SprSspInfo *info, const void *frame_in, void *frame_out)
 
void spr_ordstat_reset (SprSspInfo *info, SprSspStatus *action)
 

Detailed Description

ordered statistics

Calculate ordered statistics on a neighbourhood of each (time,frequency) point and output some derived statistics from that.


[ordstat]
nfr <nfr>(1) [duplicate/mirror](mirror)
Time window (number of frames). Initial and final frames are handled by either mirroring the input data (extra inputs) or by duplicating the first/last complete output.
nfq <nfq>(1) [duplicate/mirror](mirror)
Frequency window (number of frequency tabs). The initial and final frequency tabs are handled by either mirroring the input data (extra inputs) or by duplicating the first/last complete output.
output pct <extrapolate/interpolate/nearest>(nearest) <frac>(0.0) ...
Replace each point in the central frame by point(s) at position <pct> after sorting (small to large). With the 'nearest' option, point min(floor(pct*Npt),Npt-1) is taken. The other options interpolate between the two neighbouring points. With the interpolate option, the sorted points [0...Npt-1] correspond to pct=[0.0,...,1.0]. With the extrapolate option, the sorted points correspond to pct=[0.5,...,Npt-0.5]/Npt. This means that if pct < 0.5/Npt or pct > 1.0-0.5/Npt, the returned values need to be extrapolated.
output noise_mean <log/amplitude>(amplitude) <stopval>(2.0) <rep_cnt>(25) <min_low>(10) <ign_low>(0) <fac_slope>(0) [output_mean_all/none](none) [output_fraction/none](none)
Output an estimate of the noise mean. If the input are <log>-power spectral values (data = sum of log-Rayleigh distribution, lowest distribution equals the noise), then <stopval> is an upper value on the sigma. If the input are <amplitude> values (data = sum of Rayleigh distributions, lowest distribution equals the noise), then <stopval>(*) is a lower limit on the ratio mu/sigma and <fac_slope> is an additional; (*) a non-zero value for <fac_slope> (typical value: 16.0) will result in a variable threshold depending on the slope of the mu/sigma curve. The noise mean is calculated based on the max(<l>,<min_low>) lowest values. The value of <l> is the index of the last value for which the criterion is still met as long as the criterion was not met <rep_cnt> times. The <ign_low> lowest values are ignored in the calculations. Next to the noise mean, also the noise+speech mean and the local fraction of silence can be output (in the form of a tuple per frequency tab).

See Also
ssp_master.c
Author
Kris Demuynck
Date
23 April 2003
Revision History:
11/08/2009 - KD
use of insertion sort for faster implementation + added noise estimation