- torchaudio.functional.mu_law_encoding(x: Tensor, quantization_channels: int) Tensor ¶
Encode signal based on mu-law companding.
For more info see the Wikipedia Entry
This algorithm expects the signal has been scaled to between -1 and 1 and returns a signal encoded with values from 0 to quantization_channels - 1.
x (Tensor) – Input tensor
quantization_channels (int) – Number of channels
Input after mu-law encoding
- Return type: