# HD voice

## Standard call quality (8 kHz) and HD voice (16 kHz)

Typical copper telephony (PSTN) works in 8 kHz mode (g711 codec like PCMU/PCMA encodes/decodes signal at 8 kHz sampling rate)

Modern cloud telephony and mobile phones can operate at 16 kHz resulting in much improved signal quality. Calls running at 16 kHz are referred to as `HD voice`

{% embed url="<https://soundcloud.com/piotr-gregor/amy_welcome_to_your_dreams_8k?si=5485591cda8f4663bd5d2a7257e5ae80&utm_campaign=social_sharing&utm_medium=text&utm_source=clipboard>" %}
Standard call quality (8 kHz)
{% endembed %}

{% embed url="<https://soundcloud.com/piotr-gregor/amy_welcome_to_your_dreams_16k?si=3980f4a5cad84643ba9bcd22e2cfa233&utm_campaign=social_sharing&utm_medium=text&utm_source=clipboard>" %}
`HD voice` call quality (16 kHz)
{% endembed %}

When a call with `HD voice` travels through the internet, it is required for all the intermediate hops to support 16 kHz for the call to stay at the HD quality. However, support for 16 kHz is not ubiquitous yet amongst the core service providers and telecoms

If any service on a call path happens to miss a support for `HD voice`, or if call is sent through the old copper line, a quality of signal gets irreversibly reduced to the standard quality of 8 kHz telephony

## Voice AI and HD codecs

It gets even more important in context of Voice AI

With `HD codecs` all the extra information conveyed in the 4 - 8 kHz frequency band (*relatively* high frequencies) is available to STT or STS functions and can make significant improvement in performance 🚀

💡 When an input signal is sampled at a given sampling rate, frequencies up to half that rate can be represented in the output (sampling signals at standard telephony quality of 8 kHz preserves frequencies up to 4 kHz, signal sampled at 16 kHz sampling rate will contain frequencies up to 8 kHz of the input \[original signal])

<figure><img src="/files/mg1iNzxYXhh538mnVWfU" alt=""><figcaption><p>8 kHz sampling. Signal energy is present in the 0 - 4 kHz range after 8 kHz sampling. There is no data in 4 - 8 kHz range</p></figcaption></figure>

<figure><img src="/files/8BnsPkHkE8l6sx45DUR5" alt=""><figcaption><p>16 kHz sampling. <code>HD voice</code> allows to catch signal energy in a wide 0 - 8 kHz range. Extra information present in 4 - 8 kHz range (compared to standard call quality) improves performance of Voice AI</p></figcaption></figure>

### `HD voice` support on VoIP Number

VoIP Number has support for `HD voice` with codecs:&#x20;

* OPUS
* G722
* AMR-WB

OPUS codec can operate at even better quality encoding audio at rates up to 48 kHz

|  Codec | Sampling rate \[kHz] |                          Bitrate \[kbit/s]                         |                              Quality                             |
| :----: | :------------------: | :----------------------------------------------------------------: | :--------------------------------------------------------------: |
|  OPUS  |           8          |  all bitrates 6 - 510 kbit/s supported (8 - 12 kbit/s sufficient)  |                            narrowband                            |
|  OPUS  |          12          |  all bitrates 6 - 510 kbit/s supported (16 - 20 kbit/s sufficient) |                            medium-band                           |
|  OPUS  |          16          |  all bitrates 6 - 510 kbit/s supported (28 - 40 kbit/s sufficient) | <mark style="background-color:green;">wideband (HD voice)</mark> |
|  OPUS  |          24          |  all bitrates 6 - 510 kbit/s supported (48 - 64 kbit/s sufficient) |   <mark style="background-color:yellow;">super-wideband</mark>   |
|  OPUS  |          48          | all bitrates 6 - 510 kbit/s supported (64 - 128 kbit/s sufficient) |        <mark style="background-color:red;">fullband</mark>       |
|  G722  |          16          |                                 64                                 | <mark style="background-color:green;">wideband (HD voice)</mark> |
| AMR-WB |          16          |     6.60, 8.85, 12.65, 14.25, 15.85, 18.25, 19.85, 23.05, 23.85    | <mark style="background-color:green;">wideband (HD voice)</mark> |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.voipnumber.net/features/hd-voice.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
