paddlespeech.s2t.frontend.augmentor.shift_perturb 模块
包含体积扰动增强模型。
- class paddlespeech.s2t.frontend.augmentor.shift_perturb.ShiftPerturbAugmentor(rng, min_shift_ms, max_shift_ms)[来源]
Bases:
AugmentorBase用于添加随机位移扰动的增强模型。
- Parameters:
rng (random.Random) -- 随机生成器对象。
min_shift_ms (float) -- 最小的毫秒偏移量。
max_shift_ms (float) -- 最大毫秒偏移量。
方法
__call__(x[, uttid, train])将自身作为函数调用。
transform_audio(audio_segment)移位音频。
transform_feature(spec_segment)为输入的音频特征片段添加各种效果。