Edge Cases in Telephone-Grade Audio for STT

Edge Cases in Telephone-Grade Audio for STT

G.711 μ-law and A-law encode speech at 8 kHz with 8 bits per sample, producing a 64 kbit/s audio stream before transport overhead. That format remains common across PSTN gateways, SIP trunks, contact center systems, and outbound dialers. It also imposes constraints that are easy to miss when an STT system is tested primarily with clean 16 kHz microphone recordings.

Telephone-grade audio is not one problem. It is a collection of sampling, codec, acoustic, and transport conditions that can overlap in the same utterance. A caller may be speaking through an 8 kHz handset connection, while a G.711 stream has packet loss, a nearby fan is adding low-frequency noise, and a DTMF event arrives during a spoken word. Each condition changes the evidence available to the transcription model.

What 8 kHz Narrowband Removes

An 8 kHz sampling rate has a Nyquist frequency of 4 kHz. Traditional telephone speech is commonly limited to approximately 300 Hz to 3.4 kHz by the network and handset path. A 16 kHz stream, by contrast, can represent frequencies up to 8 kHz and generally preserves more upper-frequency speech information.

The missing upper band is not just an aesthetic difference. It contains consonant energy and spectral distinctions that help separate similar sounds. Fricatives such as s, f, and sh have substantial high-frequency content. The first and second formants remain inside the telephone band, but reduced bandwidth can make vowel and consonant boundaries less distinct, particularly when the speaker is quiet or the channel is noisy.

Telephone systems also alter the signal before it reaches STT. Handset microphones have their own frequency response, analog paths may apply filtering, and gateways can resample between clock domains. A nominally 8 kHz input does not imply that every sample contains equally useful speech information.

This is not a claim that narrowband audio makes good transcription impossible. It means that the model must make decisions using less acoustic evidence, and that upstream processing cannot recreate information removed by the channel. The practical question is whether the STT system is designed and evaluated for that condition rather than merely being given a 16 kHz file resampled down to 8 kHz at test time.

G.711 Quantization and Codec Artifacts

G.711 does not use linear 16-bit PCM values. Its μ-law and A-law companding schemes map signal amplitudes into 8-bit codewords. Companding gives more resolution to lower-amplitude signals than a simple uniform 8-bit quantizer would, which suits speech and legacy telephony. The result is still quantization error, especially when speech is quiet or when the signal has already passed through several conversion stages.

At the 64 kbit/s payload rate, G.711 is often described as uncompressed because it does not use the long-term, analysis-by-synthesis compression found in codecs such as G.729. That description should not be confused with transparent audio. The signal has limited bandwidth, 8-bit companded quantization, and possible tandem processing if it crosses multiple gateways or codec domains.

Quantization noise can raise the floor around weak speech segments. In a clean recording, a model may use subtle spectral transitions to identify a word ending. In a G.711 call, those transitions can be less stable, particularly after gain changes or analog noise. Tandem conversion can compound the problem when a call is decoded and re-encoded more than once.

For an STT pipeline, the important distinction is between codec-aware handling and a generic audio upload path. The decoder must produce the correct linear PCM representation, preserve timing, and avoid applying resampling or gain operations that introduce additional distortion. Metadata also matters. A stream declared as 16 kHz when it is actually 8 kHz can cause the frontend to interpret speech frames at the wrong time scale and frequency scale.

Line Noise, Handset Acoustics, and Echo

Noise on telephone calls is often structured rather than stationary. A call center floor may contain multiple voices, keyboard clicks, chair movement, HVAC noise, and intermittent alerts. A home caller may have a television in the background, a speakerphone with room reflections, or a handset pressed against clothing. These sounds can overlap speech in the same frequency range.

Echo creates a separate failure mode. Acoustic echo occurs when the far-end signal is picked up by a microphone and returned with a delay. Electrical or network echo can produce a related effect at another point in the call path. The repeated signal may be quieter than the original, but it can still affect voice activity detection and word boundaries. Reverberation from a room or handset enclosure smears consonant transitions without necessarily sounding severe to a human listener.

Consider a synthetic outbound-dialer deployment connected to a PSTN gateway. Agents call customers from a floor with 30 active seats. The customer side is a mixture of desk phones and mobile handsets, and the dialer receives G.711 μ-law over RTP. One call has a fan near the customer, another has a delayed echo from a speakerphone, and a third includes a neighboring agent speaking during a response. The median audio format is the same across all three calls, but the transcription errors will have different causes.

That distinction matters operationally. A global gain increase may make a quiet caller more visible while making background voices more intrusive. Aggressive noise suppression may remove some stationary noise but also deform unvoiced consonants. Echo cancellation can help when the reference signal is available, but an STT service cannot infer every property of an echo path from the received speech alone.

DTMF Is Signaling, Not Speech

Dual-tone multifrequency signals are pairs of frequencies used to represent keypad digits, symbols, and control actions. They occupy the same broad audio channel as speech, but they are not spoken language. A speech recognizer should not be expected to turn a 697 Hz plus 1,209 Hz tone into the digit "1" simply because both arrive as audio samples.

In VoIP systems, DTMF may travel as in-band audio or as an RTP telephone-event payload, commonly associated with the specifications historically identified by RFC 2833 and RFC 4733. Out-of-band telephone events are preferable for reliable application handling because the event identity and duration are carried separately from the speech waveform. In-band tones can be attenuated, clipped, or mistaken for background audio after transcoding.

The application architecture should therefore separate DTMF detection from STT. A voice menu can route telephone events to an interaction state machine while sending speech frames to transcription. If in-band detection is required, it should run as a signal-processing path with tone thresholds, minimum duration, twist limits, and debouncing. The recognized event can then be inserted into the conversation transcript as metadata, rather than treating it as a spoken word.

This separation also prevents a common timing error. A caller may press a key while saying "yes," or a menu may emit a confirmation tone while the caller begins speaking. The system needs to preserve event timestamps and define whether the DTMF event interrupts, overlaps, or merely accompanies the current speech segment.

Packet Loss and Jitter in VoIP

For a typical G.711 RTP stream with 20 ms packetization, each packet contains 160 samples per channel at 8 kHz. A missing packet therefore removes roughly 20 ms of waveform, although the perceptual and transcription impact depends on where the gap occurs. A lost segment during silence may have little effect. A lost segment at the onset of a stop consonant can change the word boundary.

Jitter causes packets to arrive at uneven intervals. A jitter buffer can smooth delivery, but it must choose between waiting longer and risking late packets. A small buffer reduces interactive delay while increasing the chance that late packets are discarded. A larger buffer improves continuity at the cost of additional latency. In a streaming STT system, that tradeoff is part of the recognition design, not just a network configuration detail.

Packet loss concealment may repeat a prior waveform, interpolate a short region, or generate a predicted continuation. Those repairs can be useful for listening, but they do not recreate the original phonetic evidence. STT models are typically exposed to natural speech variation and common background noise during training. A repeated 20 ms fragment, a hard zero-filled gap, or a clock slip is a different kind of corruption.

Observability should include RTP sequence gaps, interarrival jitter, late packets, decoder errors, and the amount of concealed audio. Without those metrics, a team may attribute every transcription error to the language model when the underlying issue is a degraded media path. Correlating these measures with segment confidence and word-level corrections can identify whether remediation belongs in networking, media handling, or recognition.

How We Handle 8 kHz Input at Smallest AI

Smallest AI supports 8 kHz narrowband input in addition to the recommended 16 kHz mono PCM16 format. The initial STT language support includes English and Spanish, with attention to the codec and noise conditions common in telephone deployments. For teams using streaming voice infrastructure, the service provides a median STT latency of approximately 45 ms, but low latency does not eliminate the need for correct media framing and transport behavior.

At the integration boundary, the most important requirements are explicit sample-rate metadata, consistent mono channel handling, correct μ-law or A-law decoding, and stable frame timing. A system should not silently label 8 kHz audio as 16 kHz, concatenate packets without accounting for sequence gaps, or mix DTMF event payloads into the speech byte stream. These errors can create artifacts that look like model failures but originate before recognition begins.

Wideband audio is preferable when the endpoint, carrier, and gateway support it. It is not always available. PSTN callers, older contact center equipment, carrier interconnection rules, and handset limitations can make 8 kHz the operating condition rather than a temporary compromise. The engineering question then shifts from how to avoid narrowband audio to how to mitigate its predictable losses: use codec-appropriate evaluation data, monitor packet health, separate signaling from speech, and preserve the original media metadata.

For a production deployment, I would evaluate more than aggregate word error rate. Break results down by sample rate, codec, packet-loss range, noise type, echo condition, speaker accent, language, and DTMF overlap. A single average can hide the fact that recognition is acceptable on clean G.711 calls but degrades sharply when a 20 ms gap intersects a short Spanish function word or an English consonant cluster.

Telephone-grade audio is a constrained measurement of speech, not a lower-resolution version of a studio microphone. Sampling limits, companding, acoustics, signaling events, and packet transport each remove or distort different evidence. Treating those factors as first-class properties of the audio pipeline makes STT behavior easier to diagnose and gives deployment teams practical choices even when 16 kHz wideband audio is unavailable.

If telephone-grade audio is part of your deployment, we'd like to hear about the specific constraints. Reach out at [email protected].

Back to Blog