Versions in this module Expand all Collapse all v0 v0.9.3 Nov 30, 2026 Changes in this version + var ErrBackpressure = errors.New("native session PCM delivery queue full") + var ErrCaptureBusy = errors.New("native session capture already in flight") + var ErrClosed = errors.New("native runtime/session closed") + var ErrControlBusy = errors.New("native playback control already pending") + var ErrDTMFBusy = errors.New("native DTMF send still in flight") + var ErrDTMFOverflow = errors.New("native incoming DTMF queue full") + var ErrSourceEnded = errors.New("native input source ended") + type Chat struct + Info *pb.TextStreamInfo + Sender string + Text string + type ClientState struct + Agent string + AgentData []byte + UserData []byte + type DTMF struct + Code uint32 + Digit string + Sender string + type DataPacket struct + Payload []byte + Topic string + type Frame struct + At int64 + PCM []int16 + type PreConnectAudio struct + Chunks [][]byte + Info *pb.ByteStreamInfo + Received time.Time + type RecordingFrame struct + Frame Frame + TrackSID string + type Runtime struct + func Open(path string) (*Runtime, error) + func (r *Runtime) Close(ctx context.Context) error + func (r *Runtime) Connect(ctx context.Context, url, token string) (*Session, error) + func (r *Runtime) ConnectMicrophone(ctx context.Context, url, token, participant, sid string) (*Session, error) + func (r *Runtime) ConnectMicrophoneCall(ctx context.Context, url, token, participant, sid string, chat, record bool) (*Session, error) + func (r *Runtime) ConnectMicrophoneCallWithPreConnect(ctx context.Context, url, token, participant, sid string, chat, record bool, ...) (*Session, error) + func (r *Runtime) ConnectMicrophoneChat(ctx context.Context, url, token, participant, sid string, enabled bool) (*Session, error) + func (r *Runtime) ConnectMicrophoneRecording(ctx context.Context, url, token, participant, sid string, chat, record bool) (*Session, error) + func (r *Runtime) ConnectSelected(ctx context.Context, url, token, participant, sid string) (*Session, error) + type Session struct + func (s *Session) BeginHold(ctx context.Context) error + func (s *Session) Capture(ctx context.Context, pcm []int16) error + func (s *Session) CaptureHold(ctx context.Context, pcm []int16) error + func (s *Session) Chats() <-chan Chat + func (s *Session) Clear(ctx context.Context) error + func (s *Session) ClientStateErrors() <-chan error + func (s *Session) Close(ctx context.Context) error + func (s *Session) DTMF() <-chan DTMF + func (s *Session) Done() <-chan struct{} + func (s *Session) EndHold(ctx context.Context) error + func (s *Session) Err() error + func (s *Session) Frames() <-chan Frame + func (s *Session) InputSubscribed() <-chan struct{} + func (s *Session) InputTrackSID() string + func (s *Session) OutputTrackSID(ctx context.Context) (string, error) + func (s *Session) ParticipantDepartures() <-chan string + func (s *Session) ParticipantIdentities() []string + func (s *Session) Pause(ctx context.Context) error + func (s *Session) PreConnectAudio() <-chan PreConnectAudio + func (s *Session) PublishCaption(ctx context.Context, req *pb.FfiRequest) error + func (s *Session) PublishData(ctx context.Context, topic string, data []byte) error + func (s *Session) RecordingFrames() <-chan RecordingFrame + func (s *Session) Resume(ctx context.Context) error + func (s *Session) SendDTMF(ctx context.Context, code uint32, digit string) error + func (s *Session) SetOutputEnabled(ctx context.Context, enabled bool) error + func (s *Session) StopClientState(ctx context.Context) error + func (s *Session) StopPreConnectAudio() + func (s *Session) UpdateClientState(ctx context.Context, v ClientState) error + func (s *Session) WaitOutputSubscribed(ctx context.Context) error + func (s *Session) WaitReady(ctx context.Context) error + func (s *Session) WaitSubscribed(ctx context.Context) error