Skip to content

Installation

Installation

go get github.com/gojargo/jargo

jargo needs Go 1.27 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.

No cgo

There is no C toolchain in the picture at all. The Opus codec and the resampler are pure Go, and the two native runtimes below are loaded at run time rather than linked, so CGO_ENABLED=0 go build ./... is the ordinary build and no build tag changes that.

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 pinned Go toolchain.
  • gojargo/jargo: distroless runtime, carrying the ONNX Runtime and RNNoise.

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 .