快捷鍵

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, optional) – 通道數量。(預設值: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 的完整開發者文件

查看文件

教學

取得針對初學者和進階開發者的深入教學

查看教學

資源

尋找開發資源並獲得您的問題解答

查看資源