快捷方式

SlidingWindowCmn

class torchaudio.transforms.SlidingWindowCmn(cmn_window: int = 600, min_cmn_window: int = 100, center: bool = False, norm_vars: bool = False)[源代码]

按话语应用滑动窗口倒谱均值(和可选方差)归一化。

This feature supports the following devices: CPU, CUDA This API supports the following properties: Autograd, TorchScript
参数
  • cmn_window (int, optional) – 用于计算运行平均 CMN 的帧窗口(int,默认为 600)

  • min_cmn_window (int, optional) – 解码开始时使用的最小 CMN 窗口(仅在开始时引入延迟)。仅当 center == false 时适用,如果 center==true 则忽略(int,默认为 100)

  • center (bool, optional) – 如果为 True,则使用以当前帧为中心的窗口(在可能的情况下,除去端点效应)。如果为 False,则窗口向左。 (bool,默认为 False)

  • norm_vars (bool, optional) – 如果为 True,则将方差归一化为一。 (bool,默认为 False)

示例
>>> waveform, sample_rate = torchaudio.load("test.wav", normalize=True)
>>> transform = transforms.SlidingWindowCmn(cmn_window=1000)
>>> cmn_waveform = transform(waveform)
forward(specgram: Tensor) Tensor[源代码]
参数

specgram (Tensor) – 尺寸为 (…, time, freq) 的频谱图张量。

返回

尺寸为 (…, time, freq) 的频谱图张量。

返回类型

张量

文档

访问全面的 PyTorch 开发者文档

查看文档

教程

为初学者和高级开发者提供深入的教程

查看教程

资源

查找开发资源并让您的问题得到解答

查看资源