clarity.evaluator.msbg.smearing module¶
Temporal smearing component of MSBG model.
- class clarity.evaluator.msbg.smearing.Smearer(rl: float, ru: float, sample_rate: float)[source]¶
Bases:
object
Class to hold the re-usable smearing filter.
- clarity.evaluator.msbg.smearing.audfilt(rl: float, ru: float, sample_rate: float, asize: int = 256) ndarray [source]¶
Calculate an auditory filter array.
- Parameters:
rl (float) – broadening factor on the lower side
ru (float) – broadening factor on the upper side
sample_rate (float) – signal sampling frequency
asize (int, optional) – number of taps in filter (default: {256})
- Returns:
A bank of auditory filters stored as 2-d numpy array
- Return type:
ndarray
- clarity.evaluator.msbg.smearing.make_smear_mat3(rl: float, ru: float, sample_rate: float) ndarray [source]¶
Make the smearing filter matrix.
- Parameters:
rl (float) – filter broadening factor on the lower side
ru (float) – filter broadening factor on the upper side
sample_rate (float) – sampling frequency
- Returns:
The FFT_SIZE/2 X FFT_SIZE/2 smearing filter matrix
- Return type:
ndarray
- clarity.evaluator.msbg.smearing.smear3(f_smear: ndarray, inbuffer: ndarray) ndarray [source]¶
Direct translation of smear3.m from MSBG hearing loss model.
- Parameters:
f_smear (ndarray) – The FFT_SIZE/2 X FFT_SIZE/2 smearing filter matrix
inbuffer (ndarray) – signal with prepended tone and noise
- Returns:
outbuffer
- Return type:
ndarray