Installation

July 28, 2026 ยท View on GitHub

go get github.com/gojargo/jargo

jargo needs Go 1.26 or newer.

The default build needs no C toolchain

CGO_ENABLED=0 go build ./...

That works out of the box. Opus encode/decode and resampling are pure Go, and the two native runtimes are bound through purego, located and loaded at run time from their shared libraries, with nothing required at build time.

This is the property that makes jargo deployable as a single static binary. Keep it unless you have a measured reason not to.

Runtime libraries

LibraryNeeded forEnv varWithout it
ONNX RuntimeSilero VAD + Smart Turn v3JARGO_ONNXRUNTIME_LIBBot still runs; falls back to STT endpointing, loses barge-in.
RNNoiseOptional input noise reductionJARGO_RNNOISE_LIBBot runs without denoising.

Both are located by their conventional name on the loader's default search path when the variable is unset.

ONNX Runtime

Download a build for your platform from the onnxruntime releases; the onnxruntime-linux-* archive contains lib/libonnxruntime.so:

export JARGO_ONNXRUNTIME_LIB=/path/to/libonnxruntime.so     # Linux
export JARGO_ONNXRUNTIME_LIB=/path/to/libonnxruntime.dylib  # macOS
set JARGO_ONNXRUNTIME_LIB=C:\path\to\onnxruntime.dll        # Windows

The VAD and turn models themselves are embedded in the binary with go:embed, so there is nothing else to download or locate.

RNNoise

sudo apt-get install -y librnnoise0     # or build from source
export JARGO_RNNOISE_LIB=/path/to/librnnoise.so

Enable it per transport rather than globally:

params := transport.DefaultParams()
if filter, err := rnnoise.New(); err == nil {
    params.AudioInFilter = filter
}

rnnoise.New returns an error when the library is missing, which is the idiomatic way to make denoising optional. See examples/voice/openai.

Optional cgo build tags

Two higher-quality C backends are available. Both are opt-in and both need a C toolchain; the pure-Go defaults are used otherwise.

TagReplacesInstall
libsoxrPure-Go resampler with the SoX Resampler (highest quality)sudo apt-get install -y libsoxr-dev
libopusPure-Go SILK encoder with the C Opus encoder (better speech)sudo apt-get install -y libopus-dev
go build -tags libsoxr ./...
go build -tags libsoxr,libopus ./...

These are the only cgo in the tree.

Docker

The published base images bundle all of the above, so you do not have to think about any of it:

  • gojargo/jargo-build: build stage, with the toolchain and C headers.
  • gojargo/jargo: distroless runtime, carrying the ONNX Runtime, RNNoise, libsoxr, libgomp and libopus.

See Deploy with Docker for a copyable Dockerfile.

Verify

go run ./examples/echo    # then open http://localhost:8080

The echo bot needs no API keys and no ONNX Runtime. If you hear yourself back, the audio path works. Then continue to Your first bot.