Tuesday, February 15, 2011

G711 vs G729 Which one to choose?

G711 is ITU-T standard for audio compression and decompression (i.e codec). It uses pulse code modulation (PCM) technique i.e sampling the audio signal and digitize each sample (voltage) to binary (0's and 1's).

Sender side:
Human Voice/Audio ---> Filter --> 4Khz ----> Nyquist Sampling at 8Khz ----> A/D converter [each sample changed to 8 bit] ----> 64Kb per second

Thus data rate of G711 is 64Kbps

Receiver side:
Digital data is converted back to audio using D/A converter.

It is very simple, less CPU intensive and widely used. However, if bandwidth is expensive, it's not a good option. There are various codecs. Most efficient (bandwidth wise *NOT* CPU wise) one is G729.

Wikipedia: G729 does coding of speech at 8 kbit/s using conjugate-structure algebraic-code-excited linear prediction (CS-ACELP).

G729 uses complex algorithms to synthesize the speakers' voice. It uses vocoder [ tone generator + white noise generator + filter] to shape the sound as the nose, lip, throat, tounge and vocal cavity do. Vocoder itself generates robotic tone which is not acceptable. Thus G729 also uses samples of speakers' voice to adjust the vocoder setting properly and it compares synthetic voice with actual voice to come up with *CODE*. Then that CODE and vocoder settings are sent to the receiver. Receiver generates the sound using the provided CODE and vocoder settings.
Isn't that cool? However, it's CPU intensive.

G711 is free, however G729 requires license ( $10 per channel).

Summary:
  • G711 sends actual sample of speakers' voice, while G729 sends the vocoder settings and calculated CODE required to generate the voice.
  • Data rate: G711 = 64Kbps , G729 = 8Kbps
  • G711 uses high bandwidth but it's not CPU intensive. G729 uses less bandwidth but it's CPU intensive
  • Unlike G711,G729 is not free
  • In VOIP implementation, G711 uses 87Kbps and G729 uses 32 Kbps (with all TCP/IP overhead)

No comments:

Post a Comment