alaw# class diffsptk.ALawCompression(abs_max=1, a=87.6)[source]# See this page for details. Parameters: abs_maxfloat > 0 [scalar]Absolute maximum value of input. afloat >= 1 [scalar]Compression factor, \(A\). forward(x)[source]# Compress waveform by A-law algorithm. Parameters: xTensor [shape=(…,)]Waveform. Returns: yTensor [shape=(…,)]Compressed waveform. Examples >>> x = diffsptk.ramp(4) >>> alaw = diffsptk.ALawCompression(4) >>> y = alaw(x) >>> y tensor([0.0000, 2.9868, 3.4934, 3.7897, 4.0000]) See also ialaw ulaw