jargo README

The project's README from github.com/gojargo/jargo. As one markdown file: README.md.

jargo

A WebRTC-native, audio-first conversational-AI framework for Go.

CI Coverage Go Reference OpenSSF Scorecard Go version Release License: BSD-2-Clause


jargo is a framework for real-time voice agents in Go: audio in over WebRTC, a streaming transcription → reasoning → speech pipeline with turn-taking and barge-in, and audio back out.

Why?

Pipecat is great, and jargo is a port of it. The architecture and many design decisions are Pipecat's.

Python might not be the way

This port exists for one reason: I'd rather not run a voice agent on Python.

Python is the right tool when you need the AI/data-science ecosystem. A real-time voice server doesn't: the models run as services or as ONNX, and what's left is plumbing: audio framing, WebRTC, concurrency, and shipping a binary. For that, Go is a better fit: one static binary to deploy, low and predictable memory, fast startup, and real concurrency for many simultaneous sessions without a GIL. The heavy numerics stay where they belong (the ONNX Runtime, the remote services), so giving up Python costs little here. See the benchmarks for the honest performance picture.

Features

Providers

Pick any per category; each is a small Config + constructor.

Usage

go get github.com/gojargo/jargo

A bot is an STT → LLM → TTS pipeline over a WebRTC transport. The heart of it:

stt := chat.NewSTT(chat.STTConfig{APIKey: key, SampleRate: opus.SampleRate})
llm := chat.NewLLM(chat.LLMConfig{APIKey: key})
tts := chat.NewTTS(chat.TTSConfig{APIKey: key})

t := rtc.NewTransport(conn, transport.DefaultParams())
agg := aggregators.New(frames.NewLLMContext("You are a helpful voice assistant."))

task := pipeline.NewWorker(pipeline.New(
	t.Input(), stt, agg.User(), llm, tts, t.Output(), agg.Assistant(),
), pipeline.WorkerConfig{})
task.Run(ctx)

examples/voice/openai is that pipeline as a complete server (WebRTC signaling, VAD/turn-taking, barge-in).

Run it in Docker: build on the gojargo/jargo-build base and ship on the distroless gojargo/jargo runtime (it bundles the ONNX Runtime), then:

docker run --rm -p 8080:8080 -e OPENAI_API_KEY=$OPENAI_API_KEY my-bot

See Deploy with Docker for the Dockerfile and the Quickstart for the full setup.

Examples

Runnable bots live in examples/:

The fastest way to try them (locally or with Docker) is the Quickstart.

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

Documentation

gojargo.github.io/jargo is the full documentation. The same pages live in docs/ and read fine on GitHub.

Start with Architecture for the model, or Frames and Processors for the engine. Writing a processor covers extending it. The API reference is the Go reference.

What you need to install

Nothing, to build: the default build is cgo-free, so CGO_ENABLED=0 go build ./... works with no C toolchain and no system packages.

To run a voice bot you need one shared library, and only for turn-taking:

What When you need it How to get it
ONNX Runtime VAD and end-of-turn detection. Without it the bot still runs, on STT endpointing, and loses barge-in. make deps-onnx, or a release
RNNoise Optional input noise reduction. make deps-rnnoise

Both libraries are loaded at run time through purego, so they are never needed at build time. Point jargo at them with JARGO_ONNXRUNTIME_LIB and JARGO_RNNOISE_LIB, or leave them on the loader's default search path. The base images bundle all of them.

License & attribution

jargo is a Go port of Pipecat, distributed under the same BSD 2-Clause License. The upstream copyright (Copyright (c) 2024–2026, Daily) is preserved verbatim in LICENSE; see NOTICE for details. jargo is an independent project, not affiliated with or endorsed by Daily.

jargo (gojargo/jargo)

Searching Database…

102 ·GitHub
这是什么?Jargo 是一个面向 Go 语言的 WebRTC 原生、以音频为先的对话式 AI 框架,用于构建实时语音智能体,采用流式 STT 到 LLM 再到 TTS 的处理流程,支持话轮转换和语音打断。
这是一个我导入使用的框架,还是一个独立运行的服务?它是一个由可插拔处理器(传输层、STT、LLM、TTS 服务)组成的 Go 框架/库,你可以把它们组装成一个机器人;examples 目录里提供了基于它构建的可运行服务示例。
怎么才能让一个语音机器人跑起来?按照 Quickstart 文档操作,运行某个示例(比如 'go run ./examples/voice/openai')并用浏览器客户端连接,或者构建 Docker 镜像(gojargo/jargo-build 基础镜像、gojargo/jargo-build 运行时镜像)以这种方式部署。
编译它需要 C 工具链或系统软件包吗?不需要,默认构建不依赖 cgo,所以 'CGOENABLED=0 go build ./...' 在没有 C 工具链的情况下也能正常编译;但要真正实现话轮转换,你需要 ONNX Runtime 共享库(通过 'make deps-onnx' 安装),还可以选择装 RNNoise 做降噪,两者都在运行时通过 purego 加载。
如果我不装 ONNX Runtime 会怎样?机器人仍然可以运行,但会退回到基于 STT 的端点检测,并失去语音打断功能,因为 VAD 和话轮结束检测(Smart Turn v3)靠的就是 ONNX Runtime。
它实际上支持哪些传输方式和服务商?传输方式包括 WebRTC(Pion)、WebSockets、LiveKit、本地音频,以及用于电话的 Twilio Media Streams;在一个很小的接口背后,几乎可以接入任何 STT、LLM 或 TTS 服务商(Deepgram、OpenAI、Anthropic、Gemini、ElevenLabs、Cartesia 等等)。
为什么要用 Go 来写,而不直接用 Python 的 Pipecat?作者不想用 Python 来跑实时语音服务:语音智能体大部分工作其实是管道拼接(音频分帧、WebRTC、并发处理),而 Go 能提供单个静态二进制文件、低内存占用、快速启动,以及没有 GIL 限制的真正的并发,重量级的机器学习模型则仍然作为外部服务或 ONNX 运行。
不用任何 API 密钥也能试用吗?可以,'echo' 示例不需要任何 API 密钥就能让你通过整条链路听到自己的声音,适合在接入真正的 STT/LLM/TTS 服务商之前测试传输层和音频通路。
它支持语音到语音模型吗,还是只能用 STT/LLM/TTS 这条链路?支持,它可以运行 OpenAI Realtime、Gemini Live、AWS Nova Sonic 这类单模型语音智能体,作为独立的 STT 到 LLM 再到 TTS 流程之外的另一种选择。
它能处理真实的电话通话吗?可以,它提供可选的电话功能,通过 Twilio Media Streams 支持呼入和呼出通话,还包括一个用户空闲看门狗,可以在对方长时间沉默时重新引导对话或挂断电话。
Creator
gojargo
Size
43.4 MB
Stars
102
Age
3mo
Commits · 90 Days