speechbrain.augment.codec 模块
通过torchaudio进行编解码器增强
该库提供了torchaudio中的编解码增强技术,用于增强音频数据处理。
有关详细指导和使用示例,请参阅教程: https://pytorch.org/audio/stable/tutorials/audio_data_augmentation_tutorial.html
注意:此代码与作为torchaudio后端的FFmpeg兼容。 使用FFmpeg2时,处理的最大样本数限制为16。
- Authors
Mirco Ravanelli 2023
摘要
类:
使用torchaudio对输入波形应用随机音频编解码器。 |
参考
- class speechbrain.augment.codec.CodecAugment(sample_rate=16000)[source]
基础:
Module使用torchaudio对输入波形应用随机音频编解码器。
该类提供了一个接口,用于将编解码增强技术应用于音频数据。
- Parameters:
sample_rate (int) – 输入波形的采样率。
Example
>>> waveform = torch.rand(4, 16000) >>> if torchaudio.list_audio_backends()[0] == 'ffmpeg': ... augmenter = CodecAugment(16000) ... output_waveform = augmenter(waveform)