in-process

command
v0.76.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2026 License: Apache-2.0 Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Example: fully in-process Voice Agent — no SpeechKit server in the path.

This is the in-process counterpart to examples/voice-agent/game-instructor (which drives a running speechkit-server over WebSocket). Here the realtime provider runs inside this binary: we construct a live.LiveProvider directly (OpenAI Realtime), wrap it in a live.Session, and drive a text dialogue. The provider connects straight to the model's realtime API — STT, the LLM turn, and TTS all happen provider-side, so a host needs no separate STT/TTS wiring.

This is the reference an independent coding agent can adapt with one prompt: "Embed a SpeechKit Voice Agent in my Go app." Swap the stdin loop for a mic source and feed session.SendAudio(pcm) to go fully voice; the OnAudio callback already receives the model's 24 kHz PCM for playback.

Run:

OPENAI_API_KEY=... go run ./examples/voice-agent/in-process

Then type a line and press Enter. Empty input or EOF (Ctrl-D / Ctrl-Z) ends the session. Audio frames from the model are counted, not played, so the example stays portable (no audio device needed).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL