Pure Go | MIT | G729/8000 | annexb=no

g729

A clean-room, G.729A-compatible speech codec for Go services that need RTP payload type 18 without cgo, native codec packages, or vendored codec source.

Decoder gate 740800/740800

Final PCM samples exact in the current private ITU Annex A oracle run.

Runtime shape 0 cgo

Pure Go implementation with no native codec dependency.

RTP target PT 18

G729/8000 send paths with explicit annexb=no.

v0.2.x release line

Built for server-side RTP media paths.

The primary target is MRCP, TTS, IVR, SIP/RTP, and other backend media applications where the input is 8 kHz mono signed 16-bit PCM and the output is 10-byte G.729 speech frames.

Supported scope

A narrow, explicit codec claim.

Supported

G729/8000 payloads

RTP payload type 18, 8 kHz clock, 10 ms speech frames, 10 bytes per frame.

Supported

ptime 10 and 20

Use one encoded frame for ptime=10, or concatenate two frames for ptime=20.

Required

annexb=no

Annex B SID, CNG, and DTX are not implemented; SID/CNG payloads are rejected.

Verified

Strict decoder

Private ITU Annex A oracle gate matches 740800/740800 final PCM samples.

Quality-gated

Independent encoder

Core is selected by listening tests, PESQ diagnostics, and FFmpeg black-box gates.

Pure Go

No cgo dependency

Deploy the codec as normal Go code without native codec packaging or vendored source.

Benchmarked

Realtime planning

Single-thread RTF and jitter benchmarks help estimate channel density per core.

Not claimed

No certification claim

ITU certification, ITU endorsement, and encoder byte-exact conformance are not claimed.

SIP/RTP integration

Advertise the exact media shape.

The codec core emits raw 10-byte speech frames. Your SIP/RTP stack owns RTP headers, timestamps, sequence numbers, jitter handling, and packet transmission.

m=audio 49170 RTP/AVP 18
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=ptime:20
a=maxptime:20

Listening comparison

Codec quality samples.

Source audio is an 8 kHz mono signed 16-bit PCM WAV. The current published comparison uses two payloads and two decoders: a bcg729 black-box encoded payload and this project's current Core encoder payload, each decoded by FFmpeg and by this project's exact local decoder.

Source

Original 8 kHz 16-bit WAV

0:00 / 0:00

Sample pending.

Black-box encoder anchor

bcg729 encoded payload

Same payload, decoded through two independent paths.

Anchor path

bcg729 encode -> FFmpeg decode

0:00 / 0:00

Sample pending.

Decoder path

bcg729 encode -> our decode

0:00 / 0:00

Sample pending.

This project

our Core encoded payload

Same local encoder payload, decoded through FFmpeg and the local decoder.

Interop path

our encode -> FFmpeg decode

0:00 / 0:00

Sample pending.

Loopback path

our encode -> our decode

0:00 / 0:00

Sample pending.

Current gate: the outbound encoder/RTP send path is black-box tested against FFmpeg, and the strict decoder is sample-exact against the private ITU Annex A final-PCM oracle (740800/740800 samples). These are project release gates, not ITU certification. Download payloads: g729-encode.g729 and bcg729-encode.g729.

Blind listening arena

Can you hear the loopback difference?

Ten 2.8 second speech-active clips are derived from an Open Speech Repository 8 kHz WAV sample. The trial order is fixed, and each round hides only which side is bcg729 encode -> FFmpeg decode and which side is our Core encode -> our decode.

Trial 1 / 10
Left
0:00 / 0:00

Loading round.

Right
0:00 / 0:00

Loading round.

Arena source: Open Speech Repository, OSR_us_000_0010_8k.wav, American English Harvard sentences, 16-bit PCM at 8 kHz. The site requires identifying the source as "Open Speech Repository".

Browser-side codec

Pure-Go encoder and decoder in WebAssembly.

Upload audio in the browser, resample it to 8 kHz mono PCM with Web Audio, encode and decode it through the current Go WASM Core default, then preview the exact 8 kHz input and decoded WAV through the custom waveform player. The live loopback button feeds that same PCM to the WASM streaming encoder in 10 ms or 20 ms chunks and schedules decoded chunks through Web Audio like a phone media stream. Raw .g729 payload files can be uploaded for decode-only checks. The browser demo is a smoke/interoperability check; the published samples above remain the reviewed listening references.

Loading Go WASM codec.

Input preview
0:00 / 0:00

Input preview pending.

WASM roundtrip
0:00 / 0:00

Roundtrip pending.

Clean-room boundary

No vendored codec source. No cgo.

The repository documents its clean-room rule and MIT distribution provenance. External codecs may be used only as black-box tools, and published demo media should carry source and redistribution records.

Search and AI summary

Short answers about g729.

These answers are intentionally concise so humans, search engines, and AI retrieval systems can quote the project scope without expanding the claim.

What is github.com/hunydev/g729?

It is a clean-room, pure-Go, MIT-licensed G.729A-compatible codec for RTP G729/8000 annexb=no send paths.

Does it require cgo or native codec libraries?

No. The codec runtime is Go code and does not require cgo, native codec packages, or vendored G.729 implementation source.

What scope is supported?

The supported scope is 10 ms G.729 Annex A speech frames, RTP payload type 18, ptime=10, ptime=20, and annexb=no.

Does it support Annex B?

No. SID/CNG/DTX and annexb=yes are not supported. SID/CNG-shaped payloads are rejected rather than decoded as speech.

Is it ITU certified?

No. The project does not claim ITU certification or ITU endorsement.

Is the encoder byte-exact?

No. The encoder is independent and quality-gated; byte-exact conformance to ITU, bcg729, FFmpeg, or another encoder is not claimed.

How was the decoder validated?

The strict decoder path matches private ITU Annex A reference PCM sample-for-sample in the current verifier run: 740800/740800 final PCM samples exact.

What are the intended use cases?

Primary use cases are server-side SIP/RTP, MRCP, TTS, IVR, VoIP media paths, testing tools, and WebAssembly codec demos.