voiceagent

package
v0.30.1 Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package voiceagent provides an embeddable Voice Agent service constructor.

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

Jump to

Keyboard shortcuts

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