快捷方式

MuLawDecoding

class torchaudio.transforms.MuLawDecoding(quantization_channels: int = 256)[source]

解码 mu-law 编码信号。

This feature supports the following devices: CPU, CUDA This API supports the following properties: TorchScript

更多信息请参阅 维基百科条目

此方法期望输入值介于 0 和 quantization_channels - 1 之间,并返回缩放到 -1 和 1 之间的信号。

参数:

quantization_channels (int, 可选) – 通道数。(默认值:256

示例
>>> waveform, sample_rate = torchaudio.load("test.wav", normalize=True)
>>> transform = torchaudio.transforms.MuLawDecoding(quantization_channels=512)
>>> mulawtrans = transform(waveform)
forward(x_mu: Tensor) Tensor[source]
参数:

x_mu (Tensor) – 需要解码的 mu-law 编码信号。

返回:

解码后的信号。

返回类型:

Tensor

文档

访问 PyTorch 的综合开发者文档

查看文档

教程

获取面向初学者和高级开发者的深入教程

查看教程

资源

查找开发资源并获得解答

查看资源