paddlespeech.s2t.frontend.augmentor.online_bayesian_normalization module
Contain the online bayesian normalization augmentation model.
- class paddlespeech.s2t.frontend.augmentor.online_bayesian_normalization.OnlineBayesianNormalizationAugmentor(rng, target_db, prior_db, prior_samples, startup_delay=0.0)[source]
Bases:
AugmentorBase
Augmentation model for adding online bayesian normalization.
- Parameters:
rng (random.Random) -- Random generator object.
target_db (float) -- Target RMS value in decibels.
prior_db (float) -- Prior RMS estimate in decibels.
prior_samples (int) -- Prior strength in number of samples.
startup_delay -- Default 0.0s. If provided, this function will accrue statistics for the first startup_delay seconds before applying online normalization.
Methods
__call__
(x[, uttid, train])Call self as a function.
transform_audio
(audio_segment)Normalizes the input audio using the online Bayesian approach.
transform_feature
(spec_segment)Adds various effects to the input audo feature segment.
- transform_audio(audio_segment)[source]
Normalizes the input audio using the online Bayesian approach.
Note that this is an in-place transformation.
- Parameters:
audio_segment (AudioSegment|SpeechSegment) -- Audio segment to add effects to.