espnet.nets.pytorch_backend.wavenet.encode_mu_law
Less than 1 minute
espnet.nets.pytorch_backend.wavenet.encode_mu_law
espnet.nets.pytorch_backend.wavenet.encode_mu_law(x, mu=256)
Perform mu-law encoding.
- Parameters:
- x (ndarray) – Audio signal with the range from -1 to 1.
- mu (int) – Quantized level.
- Returns: Quantized audio signal with the range from 0 to mu - 1.
- Return type: ndarray