voiceagent

package
v0.54.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2026 License: Apache-2.0 Imports: 3 Imported by: 1 module, 1 package

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

Package voiceagent provides an embeddable Voice Agent service.

Voice Agent is the realtime audio-to-audio mode: a duplex WebSocket session with the underlying live model (Gemini Live, OpenAI Realtime, or a pipeline fallback) where the user and the agent take audio turns in sequence. Use this when the host needs brainstorming, support, or follow-up dialogue rather than a one-shot result.

For tool registration, lifecycle hooks, and session memory, build on top of this with github.com/kombifyio/SpeechKit/pkg/speechkit/agentkit.

Construct an instance with [New], passing a provider and the strict- mode policy fields from the host config.

Index

Constants

This section is empty.

Variables

View Source
var ErrMissingProvider = errors.New("speechkit voiceagent: provider is required")

Functions

This section is empty.

Types

type Callbacks

type Callbacks struct {
	OnAudio func([]byte)
	OnText  func(string)
	OnError func(error)
}

type Config

type Config struct {
	ProviderProfileID string
	Model             string
	Locale            string
	Instruction       string
}

type Options

type Options struct {
	Config    Config
	Callbacks Callbacks
	Provider  Provider
}

type Provider

type Provider interface {
	StartVoiceAgent(context.Context, Config, Callbacks) error
	StopVoiceAgent(context.Context) (speechkit.VoiceAgentSession, error)
	SendText(context.Context, string) error
	CurrentSession(context.Context) (speechkit.VoiceAgentSession, error)
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(opts Options) (*Service, error)

func (*Service) CurrentSession

func (s *Service) CurrentSession(ctx context.Context) (speechkit.VoiceAgentSession, error)

func (*Service) SendText

func (s *Service) SendText(ctx context.Context, text string) error

func (*Service) Start

func (s *Service) Start(ctx context.Context) error

func (*Service) Stop

Directories

Path Synopsis
Package cascaded implements a turn-based STT -> LLM -> TTS voice agent provider.
Package cascaded implements a turn-based STT -> LLM -> TTS voice agent provider.
Package live exposes the low-level Voice Agent realtime-protocol types.
Package live exposes the low-level Voice Agent realtime-protocol types.
livecontract
Package livecontract provides reusable conformance checks for LiveProvider implementations.
Package livecontract provides reusable conformance checks for LiveProvider implementations.
Package local implements voiceagent.Provider on top of an in-process live session — realtime voice agents (Deepgram Voice Agent, Gemini Live, OpenAI Realtime, AssemblyAI, cascaded) without a speechkit-server.
Package local implements voiceagent.Provider on top of an in-process live session — realtime voice agents (Deepgram Voice Agent, Gemini Live, OpenAI Realtime, AssemblyAI, cascaded) without a speechkit-server.

Jump to

Keyboard shortcuts

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