Versions in this module Expand all Collapse all v0 v0.2.0 Nov 22, 2026 v0.1.0 Sep 6, 2026 Changes in this version + var ErrMediaExpired = errors.New("media handle is no longer retained") + type Duplex struct + func NewDuplex(config DuplexConfig) *Duplex + func (duplex *Duplex) AgentAudioHandedOff(utteranceID string, duration time.Duration) error + func (duplex *Duplex) AgentAudioStopped(atNS uint64) + func (duplex *Duplex) Close() + func (duplex *Duplex) Observe(observer Observer) func() + func (duplex *Duplex) Snapshot() Snapshot + func (duplex *Duplex) UserSpeechStarted(atNS uint64) + func (duplex *Duplex) UserSpeechStopped(atNS uint64) + type DuplexConfig struct + Scheduler clock.Scheduler + type Media struct + Bytes []byte + Ref trajectory.MediaRef + type MediaConfig struct + MaxBytes int + MaxItems int + Scheduler clock.Scheduler + Window time.Duration + type MediaMetrics struct + Evicted uint64 + LiveBytes int + LiveItems int + MaxBytes int + MaxItems int + Misses uint64 + Retained uint64 + WindowMillis int64 + type MediaStore struct + func NewMediaStore(config MediaConfig) (*MediaStore, error) + func (store *MediaStore) Metrics() MediaMetrics + func (store *MediaStore) Release(handle string) + func (store *MediaStore) Resolve(handle string) (Media, error) + func (store *MediaStore) Retain(reference trajectory.MediaRef, payload []byte) (trajectory.MediaRef, error) + type Observer func(Transition) + type Phase string + const PhaseAgentSpeaking + const PhaseListening + const PhaseOverlap + const PhaseUserSpeaking + type Snapshot struct + AgentAudioStartedNS uint64 + AgentSpeaking bool + AgentUtteranceID string + Generation uint64 + Phase Phase + PlayoutHorizonNS uint64 + UserSpeaking bool + UserSpeechEndedNS uint64 + UserSpeechStartedNS uint64 + func (snapshot Snapshot) Overlapping() bool + func (snapshot Snapshot) Silent() bool + func (snapshot Snapshot) String() string + type Transition struct + After Snapshot + AtNS uint64 + Before Snapshot + Kind TransitionKind + func (transition Transition) Reason() string + type TransitionKind string + const AgentAudioStarted + const AgentAudioStopped + const UserSpeechStarted + const UserSpeechStopped