快捷方式

滑动窗口CMN

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, 可选) – 用于计算运行平均 CMN 的帧窗口 (int, 默认值 = 600)

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

  • center (bool, 可选) – 如果为 true,则使用以当前帧为中心的窗口(尽可能,考虑末端效应)。如果为 false,则窗口位于左侧。(bool, 默认值 = false)

  • norm_vars (bool, 可选) – 如果为 true,则将方差归一化为 1。(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) – 维度为 (…, 时间, 频率) 的语谱图 Tensor。

返回:

维度为 (…, 时间, 频率) 的语谱图 Tensor。

返回类型:

Tensor

文档

访问 PyTorch 的全面开发者文档

查看文档

教程

获取适合初学者和高级开发者的深度教程

查看教程

资源

查找开发资源并获取问题解答

查看资源