Versions in this module Expand all Collapse all v0 v0.1.0 Aug 30, 2026 Changes in this version + const EventClientMessage + const LegacySupportedMajor + const LibraryName + const TypeBotAudioLevel + const TypeBotInterrupted + const TypeBotLLMStarted + const TypeBotLLMStopped + const TypeBotTTSStarted + const TypeBotTTSStopped + const TypeClientMessage + const TypeDTMF + const TypeDisconnectBot + const TypeErrorResponse + const TypeFunctionCallResult + const TypeLLMFunctionCall + const TypeLLMFunctionCallStart + const TypeLLMFunctionCallStop + const TypeRawAudio + const TypeRawAudioBatch + const TypeSendText + const TypeServerMessage + const TypeServerResponse + const TypeUserAudioLevel + const TypeVADUserStarted + const TypeVADUserStopped + func LibraryVersion() string + type AboutClientData struct + Library string + LibraryVersion string + Platform string + PlatformDetails any + PlatformVersion string + type AudioLevelData struct + Value float64 type BotReadyData + About *AboutClientData + type ClientMessageFrame struct + Data json.RawMessage + MsgID string + Type string + func NewClientMessageFrame(msgID, msgType string, data json.RawMessage) *ClientMessageFrame + func (f *ClientMessageFrame) String() string + type ClientReadyData struct + About AboutClientData + Version string + func ParseClientReadyData(raw json.RawMessage) (ClientReadyData, error) + type ConfigureObserverFrame struct + FunctionCallReportLevel map[string]FunctionCallReportLevel + VADUserSpeakingEnabled *bool + func NewConfigureObserverFrame(level map[string]FunctionCallReportLevel, vadUserSpeaking *bool) *ConfigureObserverFrame + func (f *ConfigureObserverFrame) String() string + type DTMFData struct + Buttons []string + type ErrorResponseData struct + Error string + type FunctionCallReportLevel string + const ReportDisabled + const ReportFull + const ReportName + const ReportNone + type FunctionCallResultData struct + Arguments json.RawMessage + FunctionName string + Result json.RawMessage + ToolCallID string + func ParseFunctionCallResultData(raw json.RawMessage) (FunctionCallResultData, error) + func (d FunctionCallResultData) ResultText() string + type LLMFunctionCallData struct + Arguments json.RawMessage + FunctionName string + ToolCallID string + type LLMFunctionCallStartData struct + FunctionName string + type LLMFunctionCallStoppedData struct + Canceled bool + FunctionName string + Result string + ToolCallID string type Message + func BotAudioLevel(level float64) Message + func ErrorResponse(id, err string) Message + func LLMFunctionCall(name, toolCallID string, args json.RawMessage, level FunctionCallReportLevel) Message + func LLMFunctionCallStart(name string, level FunctionCallReportLevel) Message + func LLMFunctionCallStopped(name, toolCallID, result string, canceled bool, level FunctionCallReportLevel) Message + func ServerMessage(data any) Message + func ServerResponse(id, msgType string, data any) Message + func UserAudioLevel(level float64) Message type MetricsData + STTUsage []MetricData + TTFA []TTFAMetricData + TextAggregation []MetricData + Turn []TurnMetricData + type Observer struct + func NewObserver(sink *Processor) *Observer + func NewObserverWithParams(sink *Processor, params ObserverParams) *Observer + func (o *Observer) AddIgnoredSource(source processor.Processor) + func (o *Observer) OnPushFrame(data processor.FramePushed) + func (o *Observer) RemoveIgnoredSource(source processor.Processor) + type ObserverParams struct + AudioLevelPeriod time.Duration + BotAudioLevelEnabled bool + BotLLMEnabled *bool + BotSpeakingEnabled *bool + BotTTSEnabled *bool + FunctionCallReportLevel map[string]FunctionCallReportLevel + IgnoredSources []processor.Processor + MetricsEnabled *bool + UserAudioLevelEnabled bool + UserSpeakingEnabled *bool + UserTranscriptionEnabled *bool + VADUserSpeakingEnabled bool + func DefaultObserverParams() ObserverParams type Processor + func (p *Processor) Cleanup(ctx context.Context) error + func (p *Processor) ClientVersion() [3]int + func (p *Processor) Send(msg Message) + func (p *Processor) SendErrorResponse(ctx context.Context, msg *ClientMessageFrame, reason string) error + func (p *Processor) SendServerMessage(ctx context.Context, data any) error + func (p *Processor) SendServerResponse(ctx context.Context, msg *ClientMessageFrame, data any) error + func (p *Processor) Setup(ctx context.Context, s processor.Setup) error + type RawAudioData struct + Base64Audio string + Base64AudioBatch []string + NumChannels int + SampleRate int + func ParseRawAudioData(raw json.RawMessage) (RawAudioData, error) + func (d RawAudioData) Chunks() []string + type RawClientMessageData struct + D json.RawMessage + T string + func ParseRawClientMessageData(raw json.RawMessage) (RawClientMessageData, error) + type RawServerResponseData struct + D any + T string + type SendTextData struct + Content string + Options *SendTextOptions + func ParseSendTextData(raw json.RawMessage) (SendTextData, error) + func (d SendTextData) AudioResponse() bool + func (d SendTextData) RunImmediately() bool + type SendTextOptions struct + AudioResponse *bool + RunImmediately *bool + type ServerMessageFrame struct + Data any + func NewServerMessageFrame(data any) *ServerMessageFrame + func (f *ServerMessageFrame) String() string + type ServerResponseFrame struct + ClientMsg *ClientMessageFrame + Data any + Error string + func NewServerErrorResponseFrame(msg *ClientMessageFrame, reason string) *ServerResponseFrame + func NewServerResponseFrame(msg *ClientMessageFrame, data any) *ServerResponseFrame + func (f *ServerResponseFrame) String() string + type TTFAMetricData struct + LeadingSilence float64 + Model string + Processor string + TTFA float64 + TTFB float64 + type TurnMetricData struct + Complete bool + Probability float64 + ProcessingMs float64 + Processor string v0.0.5 Jul 13, 2026 v0.0.4 Jul 12, 2026 Changes in this version + const MessageLabel + const ProtocolVersion + const TypeBotLLMText + const TypeBotReady + const TypeBotStartedSpeaking + const TypeBotStoppedSpeaking + const TypeBotTTSText + const TypeBotTranscription + const TypeClientReady + const TypeError + const TypeMetrics + const TypeUserStartedSpeaking + const TypeUserStoppedSpeaking + const TypeUserTranscription + type BotReadyData struct + Version string + type ErrorData struct + Error string + Fatal bool + type Incoming struct + Data json.RawMessage + ID string + Label string + Type string + func ParseIncoming(raw []byte) (Incoming, error) + type Message struct + Data any + ID string + Label string + Type string + func BotLLMText(text string) Message + func BotReady(id string) Message + func BotTTSText(text string) Message + func BotTranscription(text string) Message + func Error(msg string, fatal bool) Message + func Metrics(data MetricsData) Message + func UserTranscription(text, userID, timestamp string, final bool) Message + type MetricData struct + Model string + Processor string + Value float64 + type MetricsData struct + Characters []MetricData + Processing []MetricData + TTFB []MetricData + Tokens []TokenMetricData + type Processor struct + func NewProcessor() *Processor + func (p *Processor) ProcessFrame(ctx context.Context, f frames.Frame, dir processor.Direction) error + type TextData struct + Text string + type TokenMetricData struct + CompletionTokens int64 + Model string + Processor string + PromptTokens int64 + TotalTokens int64 + type UserTranscriptionData struct + Final bool + Text string + Timestamp string + UserID string