Thanks to Voice over Internet Protocol (VoIP), today’s phone calls are crystal-clear and only need an internet connection. It’s all possible because of VoIP codecs.
Read along as we discuss what a codec means and how you can select the right codec for your VoIP phone system.
What Are VoIP Codecs?
A VoIP codec is a technology that determines the audio quality, bandwidth, and compression of Voice over Internet Protocol (VoIP) phone calls. VoIP codecs use either proprietary or open-source algorithms. The word codec is a portmanteau of two terms: Compression and Decompression.
Codecs are the reason why you can download a movie in minutes, not hours. Practical examples of codecs include image capture (JPEG), encryption software (AES), streaming media (H.264), and music and audio recording software (MP3).
For instance, codecs determine the quality and bandwidth you need to watch videos on YouTube or Netflix. In the case of a VoIP codec, it converts analog voice signals into digital packets or a compressed digital form for transmission and then back into an uncompressed audio signal.
VoIP codecs determine the call quality and latency in a conversation since the call takes place through the internet. You might encounter some VoIP problems since calls travel over the internet.
If your VoIP provider has multiple data centers, reliability is a non-issue for a vast majority of phone calls.
Key Components of VoIP Codecs
While the overall process of capturing, converting, transmitting, and playing back voice involves multiple components in a VoIP system, the codec itself has several key aspects to consider:
1. Sampling rate
It’s the frequency at which the analog voice signal is sampled and converted into digital data. Higher sampling rates capture more detail and lead to better audio quality, but also require more bandwidth. Common sampling rates in VoIP codecs are 8 kHz, 16 kHz, and 48 kHz.
2. Bit depth
This determines the precision of each sample, similar to the resolution of an image. Higher bit depth provides a more nuanced representation of the sound wave but also increases data size. Typical bit depths used are 8-bit and 16-bit.
Audio bitrates (the amount of data transferred into audio) capture more sound information per second. Generally, a higher bitrate indicates better sound quality.
3. Compression algorithm
This is the heart of the codec that reduces the data size for efficient transmission. Different algorithms achieve varying levels of compression with trade-offs in audio quality and processing complexity.
Common compression methods include:
- Subband coding: Decomposes the signal into different frequency bands and selectively encodes them based on importance.
- Linear predictive coding (LPC): Predicts upcoming samples based on past ones, reducing redundancy.
- Vector quantization (VQ): Groups similar-sounding samples into “codevectors” for efficient representation.
4. Packet size
The compressed data is divided into packets for transmission over the network. This process is known as packetization.
Packet size affects delay and jitter, influencing real-time communication quality. Jitter buffers smooth out the variability in packet arrival times by buffering a certain amount of voice packets before playout. This compensates for network jitter.
Choosing an optimal size balances efficient transmission while minimizing delays.
5. Error correction & concealment
Networks aren’t perfect, and packets can be lost or corrupted. The codec can incorporate error correction or concealment mechanisms to mitigate these issues.
Error correction attempts to recover lost data, while concealment attempts to mask missing information by using surrounding samples.
How Do VoIP Codecs Work?
VoIP codecs encode and decode voice signals to transmit voice over IP networks. Here’s a quick overview of how they work:
Analog to digital conversion
A codec first digitizes an analog voice signal from a microphone into a digital signal. This process samples the voice signal at regular intervals and stores the amplitudes of the voice waveform at each sample in a digital format.
Common sampling rates are 8,000 samples or 16,000 per second.
Encoding
The codec then compresses or encodes the raw digital voice data to optimize it for transmission over packet networks.
Many voice coding/decoding algorithms (codecs) use compression techniques like audio spectral analysis, prediction, and differential coding. Some popular codecs are G.711, G.729, Speex, and OPUS.
Packetizing
The encoded voice data is then chopped up and packaged into small packets with address and control data attached to them. These voice packets can then be transmitted over the IP network.
Decoding
When the packets reach the recipient device, the codec unpacks them, puts the digital voice information back together in the right order, and decodes the compressed voice data to reconstruct the original digital audio signal.
Digital to analog conversion
Finally, the digital signal is converted back into an analog waveform so it can be played out through a speaker. This is done by a DAC (digital-to-analog converter).
Types of VoIP Codecs
As there are plenty of codec choices, choosing a specific one can be tricky. Below, we’ve listed a few individual codecs to consider.
1. Narrowband codecs
Narrowband codecs are audio codecs designed to operate at low bitrates, typically below 16 kbps. They’re optimized for encoding speech audio at the expense of music/wideband audio quality and exploit the relatively narrow frequency range of human speech (about 300-3400 Hz).
Narrowband codecs focus specifically on compressing human voice at the cost of bandwidth and general audio quality. Their constraints inform applications like phone calls, meeting software, and call centers, where bandwidth is limited but clear voice communication is paramount.
Here are a few common ones.
- G.711 – The most common narrowband codec. It has a bandwidth of 300 Hz to 3.4 kHz, which is optimized for traditional telephony voice quality.
- G.729 – Another popular narrowband codec. Operates at 8 kbps with a bandwidth of up to 3.4 kHz. Provides good voice quality at low bitrates.
- G.726 – A variable bitrate narrowband codec with bandwidth up to 3.4 kHz. Can operate between 16-40 kbps.
- G.723 – A legacy narrowband codec that operates at very low bitrates of 5.3 or 6.3 kbps. Voice quality is lower but usable.
2. Wideband codecs
Wideband codecs refer to audio codecs that can encode higher-fidelity audio signals beyond the limitations of traditional narrowband telephony codecs. They can encode and decode frequencies up to around 7-8 kHz, over double the maximum frequency range of narrowband codecs like G.711 (~3.4 kHz).
What are some common ones?
- G.722 – An HD voice codec with improved audio quality due to a wider bandwidth of 50 Hz to 7 kHz compared to narrowband codecs.
- AMR-WB – Stands for Adaptive Multi-Rate Wideband. Developed for mobile phone networks, it encodes HD voice from 50 Hz up to 7 kHz.
- Opus – One of the newest and most advanced wideband codecs. Supports a range of bitrates from 6 kbps to 510 kbps and bandwidth from narrowband up to 20 kHz. Provides great flexibility.
Wideband codecs build on narrowband codecs to support near-high-fidelity voice and audio quality. This comes at the cost of higher bitrates. But with modern networks, wideband codecs are commonly employed to deliver richer voice communication and media experiences.
How Codecs Improve Call Quality
VoIP relies on audio codecs to encode and decode voice signals for transmission over the internet. These codecs compress the audio to reduce bandwidth requirements but can impact call quality if not properly optimized.
VoIP phone services use wideband codecs like G.722 to support higher audio frequencies up to 7 kHz, compared to narrowband codecs like G.711, which only support up to 3.4 kHz. This allows wideband codecs to more accurately represent the human voice, which ranges from 80 Hz to 14 kHz. The additional high-frequency information better conveys nuances like emotion and articulation.
Wideband codecs sample the audio signal at least 16,000 times per second to sufficiently capture this larger frequency range. Advanced codecs like Opus are even able to dynamically adjust the bitrate to balance bandwidth efficiency with audio quality.
Additionally, VoIP platforms use mechanisms like packet loss concealment and acoustic echo cancellation to minimize background noise and interference that can further degrade call quality.
By supporting wider frequency ranges and optimizing real-time performance, modern VoIP codecs can transmit clearer, richer voice signals resulting in a more natural conversational experience comparable to speaking face-to-face.
Choosing the Right Codec
Cloud VoIP phone systems determine which codecs are available for your hardware. Codecs compress and decompress audio signals to transmit voice data efficiently over IP networks.
VoIP providers transmit the data packets over the internet, while IP phones need to compress and decompress the audio effectively on the endpoints using codecs.
The caller and the called phones negotiate the proper codec whenever there is a call connection attempt. Both the caller and receiver phones have a prioritized list of supported codecs to agree on the optimal one to use.
When it comes time to select the best codec for your phone system, opt for the one that works best given your needs. Think about your team’s real-world bandwidth capabilities and average concurrent call volumes.
If call quality is a top priority, you should place the wideband codec G.722 first in your preference list and then G.711. G.722 provides exceptional voice quality but uses more bandwidth. However, if lower bandwidth utilization is your primary concern due to network constraints, set the low-bitrate codec G.729 ahead of G.711.
Here’s a table comparing the popular codecs.
Feature | G.711 | G.722 | G.729 | Opus |
---|---|---|---|---|
Bitrate (kbps) | 64 | 48/56/64 | 8 | 8-512 |
Audio quality | High | High (HD) | Good | Excellent |
Bandwidth requirement | High | High | Low | Variable |
Latency | Low | Low | Moderate | Variable |
Processing power | Low | Low | Moderate | Moderate |
Cost | Free | Royalty-free | Royalty-free | Open-source |
Supported devices | Most widely used | Wide range | Popular | Growing |
Strengths | Simple, low latency | HD audio, natural sound | Low bandwidth, error-tolerant | Versatile, high quality |
Weaknesses | High bandwidth, less detail | High bandwidth, limited devices | Moderate quality, higher latency | Variable quality, complex |
Since almost all VoIP phones and providers still accept G.711, the newer G.722 codec likely has more limited compatibility.
IT professionals often prefer the G.722 codec for remarkably clear voice conversations without placing an excessive burden on the local area network.
Pick the Right VoIP System for Better Codecs
VoIP phone systems enhance your business productivity by enabling seamless voice communication between your team members, partners, and customers.
Advanced audio compression algorithms called codecs make it possible to transmit high-quality voice over IP networks without the complexity of traditional telecom equipment.
You don’t need to stress over the technical details of VoIP codecs. When you select an industry-leading cloud phone system provider like Nextiva, you leverage its engineering expertise to handle optimizations behind the scenes.
Nextiva recognizes crystal clear call quality as essential to your operations and customer satisfaction. We proactively ensure optimal codec selection and performance tuning, prioritizing HD codecs for natural sound while balancing bandwidth constraints.
Nextiva’s voice infrastructure and networks are engineered to unlock the full potential of VoIP audio — so you can focus on business goals rather than technical protocols under the hood.
Take care of your phone system once and for all.
VoIP Codecs FAQs
Devices exchange information about their supported codecs during call setup and agree on the best commonly supported codec given bandwidth and other conditions.
Packet loss and jitter can degrade the audio quality of a VoIP call. Some codecs like G.711 are more sensitive while others like Opus are more resilient to these network impairments.
— Check codec compatibility between devices. If the VoIP phones/gateways support different codecs, calls may fail or have quality issues. Ensure compatible codecs on all devices.
— Disable low bandwidth codecs. If you notice choppy audio or dropped calls, disable bandwidth-intensive codecs like G.729 in favor of G.711.
— Enable codec resiliency settings. Some codecs like Opus have mechanisms to mitigate packet loss. Enable these settings to maintain call quality on poor networks.
— Reboot VoIP devices. Issues with codec negotiation or audio pathways can often be fixed by rebooting phones, gateways, and other VoIP devices to reset settings.
— Prioritize VoIP traffic. Use Quality of Service (QoS) configurations on your routers/switches to prioritize VoIP/RTP packets to minimize latency, jitter, and packet loss which lower call quality.
— Monitor codec use. Check codec statistics on your VoIP server/SBC to see which codecs are being used. This can help identify if a certain codec is problematic.
— Update firmware and software. Outdated firmware or software, especially audio codec libraries, can introduce codec compatibility issues. Update to current versions.