快捷方式

MuLawDecoding

class torchaudio.transforms.MuLawDecoding(quantization_channels: int = 256)[原始碼]

解碼 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[原始碼]
引數:

x_mu (Tensor) – 需要解碼的 mu-law 編碼訊號。

返回值:

解碼後的訊號。

返回型別:

Tensor

文件

訪問 PyTorch 的全面開發者文件

檢視文件

教程

獲取針對初學者和高階開發者的深度教程

檢視教程

資源

查詢開發資源並獲得問題解答

檢視資源