athena.transform.feats.add_rir_noise_aecres
¶
This model adds noise/rir to signal.
Module Contents¶
Classes¶
Add a random signal-to-noise ratio noise or impulse response to clean speech. |
- class athena.transform.feats.add_rir_noise_aecres.Add_rir_noise_aecres(config: dict)¶
Bases:
athena.transform.feats.base_frontend.BaseFrontend
Add a random signal-to-noise ratio noise or impulse response to clean speech.
- classmethod params(config=None)¶
Set params. :param config: contains nine optional parameters:
- --sample_rate
: Sample frequency of waveform data. (int, default = 16000)
- --if_add_rir
: If true, add rir to audio data. (bool, default = False)
- --rir_filelist
: FileList path of rir.(string, default = ‘rirlist.scp’)
- --if_add_noise
: If true, add random noise to audio data. (bool, default = False)
- --snr_min
: Minimum SNR adds to signal. (float, default = 0)
- --snr_max
: Maximum SNR adds to signal. (float, default = 30)
- --noise_filelist
: FileList path of noise.(string, default = ‘noiselist.scp’)
- --if_add_aecres
: If true, add aecres to audio data. (bool, default = False)
- --aecres_filelist
: FileList path of aecres.(string, default = ‘aecreslist.scp’)
- Returns
An object of class HParams, which is a set of hyperparameters as name-value pairs.
- call(audio_data, sample_rate=None)¶
Caculate power spectrum or log power spectrum of audio data. :param audio_data: the audio signal from which to compute spectrum.
Should be an (1, N) tensor.
- Parameters
sample_rate – [option]the samplerate of the signal we working with, default is 16kHz.
- Returns
A float tensor of size N containing add-noise audio.