# mu-law companding

Started by January 23, 2008
```hi all,
I'm doing some tests with mu-law companding. I have a speech signal
with Fs = 16 kHz, 16-bit. I test on 2 methods to encoding in 8/4/2
bit:
- 1st methode: using uniform quantization 256/ 16/ 4 levels.
- 2nd methode: using mu-law to compand sigal before, then using
uniform quantization 256/ 16/ 4 levels, then using mu-law inrerse.

In all three cases, the SNR with mu-law companding  is always lower
than do the quantization directly. can any one help?
Thks
```
```On Jan 23, 3:58&#2013266080;pm, "ky.nh...@gmail.com" <ky.nh...@gmail.com> wrote:
> hi all,
> I'm doing some tests with mu-law companding. I have a speech signal
> with Fs = 16 kHz, 16-bit. I test on 2 methods to encoding in 8/4/2
> bit:
> - 1st methode: using uniform quantization 256/ 16/ 4 levels.
> - 2nd methode: using mu-law to compand sigal before, then using
> uniform quantization 256/ 16/ 4 levels, then using mu-law inrerse.
>
> In all three cases, the SNR with mu-law companding &#2013266080;is always lower
> than do the quantization directly. can any one help?
> Thks

Hi Ky,

The linear quantizer gives you maximum SNR at maximum signal size and
decreased SNR as the size of the signal (and number of bits actually
used) decreases.

The idea of the companding is that you give up the linear quantizer's
maximum SNR, and get a lower SNR (still good for voice) that is close
to constant over a much larger range of signal amplitudes (dynamic
range).  For mu-255 the SNR vs dynamic range description is
approximately 30 dB SNR over a 30 dB dynamic range (one of the 30's is
actually about 33 dB IIRC, it has been years since I read this). IIRC,
the book "Digital Telephony" by Belamy gives the correct numbers.

Dirk
```