Documentation
¶
Index ¶
- Constants
- type AgentServer
- func (s *AgentServer) ActiveJobs() []*JobContext
- func (s *AgentServer) ActiveRunningJobs() []workeripc.RunningJobInfo
- func (s *AgentServer) Drain(ctx context.Context) error
- func (s *AgentServer) DrainWithTimeout(ctx context.Context, timeout time.Duration) error
- func (s *AgentServer) Draining() bool
- func (s *AgentServer) ExecuteLocalJob(ctx context.Context, roomName string, participantIdentity string) error
- func (s *AgentServer) ExecuteLocalJobWithOptions(ctx context.Context, roomName string, participantIdentity string, ...) error
- func (s *AgentServer) ExecuteRunningJob(ctx context.Context, info workeripc.RunningJobInfo) error
- func (s *AgentServer) GetConsoleSession() any
- func (s *AgentServer) ID() string
- func (s *AgentServer) OnWorkerRegistered(handler WorkerRegisteredHandler)
- func (s *AgentServer) OnWorkerStarted(handler WorkerStartedHandler)
- func (s *AgentServer) RTCSession(entrypoint func(*JobContext) error, request func(*JobRequest) error, ...) error
- func (s *AgentServer) ReloadRunningJobs(ctx context.Context, jobs []workeripc.RunningJobInfo, now time.Time) error
- func (s *AgentServer) Run(ctx context.Context) error
- func (s *AgentServer) RunUnregistered(ctx context.Context) error
- func (s *AgentServer) SetConsoleSession(session any)
- func (s *AgentServer) UpdateOptions(opts WorkerOptions) error
- func (s *AgentServer) WorkerInfo() WorkerInfo
- type AudioDecoder
- type AudioEncoder
- type AutoSubscribe
- type ConnectOptions
- type JobAPI
- type JobAcceptArguments
- type JobContext
- func (c *JobContext) API() *JobAPI
- func (c *JobContext) AddParticipantEntrypoint(entrypoint ParticipantEntrypoint, kinds ...livekit.ParticipantInfo_Kind) error
- func (c *JobContext) AddSIPParticipant(ctx context.Context, callTo string, trunkID string, identity string, ...) (*livekit.SIPParticipantInfo, error)
- func (c *JobContext) AddShutdownCallback(callback any) error
- func (c *JobContext) Agent() *lksdk.LocalParticipant
- func (c *JobContext) AvatarStartInfo() agent.AvatarStartInfo
- func (c *JobContext) Connect(ctx context.Context, cb *lksdk.RoomCallback, options ...ConnectOptions) error
- func (c *JobContext) CreateSIPParticipant(ctx context.Context, req *livekit.CreateSIPParticipantRequest) (*livekit.SIPParticipantInfo, error)
- func (c *JobContext) DeleteRoom(ctx context.Context, roomName string) (*livekit.DeleteRoomResponse, error)
- func (c *JobContext) InitRecording(options agent.RecordingOptions)
- func (c *JobContext) IsFakeJob() bool
- func (c *JobContext) JobID() string
- func (c *JobContext) LocalParticipantIdentity() string
- func (c *JobContext) LogContextFields() map[string]any
- func (c *JobContext) MakeSessionReport(sessions ...*agent.AgentSession) (*agent.SessionReport, error)
- func (c *JobContext) MoveParticipant(ctx context.Context, room string, identity string, destinationRoom string) error
- func (c *JobContext) ParticipantIdentity() string
- func (c *JobContext) PrimarySession() (*agent.AgentSession, error)
- func (c *JobContext) Proc() *JobProcess
- func (c *JobContext) PublisherInfo() *livekit.ParticipantInfo
- func (c *JobContext) RoomInfo() *livekit.Room
- func (c *JobContext) SessionDirectory() string
- func (c *JobContext) SetLogContextFields(fields map[string]any)
- func (c *JobContext) SetPrimarySession(session *agent.AgentSession)
- func (c *JobContext) SetSessionDirectory(path string)
- func (c *JobContext) Shutdown(reasons ...string)
- func (c *JobContext) ShutdownDone() <-chan struct{}
- func (c *JobContext) Tagger() *agent.Tagger
- func (c *JobContext) Terminated() bool
- func (c *JobContext) TokenClaims() (*auth.ClaimGrants, error)
- func (c *JobContext) TransferSIPParticipant(ctx context.Context, identity string, transferTo string, playDialtones ...bool) error
- func (c *JobContext) TransferSIPParticipantByParticipant(ctx context.Context, participant any, transferTo string, playDialtones ...bool) error
- func (c *JobContext) WaitForAgent(ctx context.Context, agentName ...string) (*lksdk.RemoteParticipant, error)
- func (c *JobContext) WaitForParticipant(ctx context.Context, identity string, kinds ...livekit.ParticipantInfo_Kind) (*lksdk.RemoteParticipant, error)
- func (c *JobContext) WaitForParticipantAttribute(ctx context.Context, identity string, attribute string, value string) error
- func (c *JobContext) WaitForTrackPublication(ctx context.Context, identity string, kinds ...livekit.TrackType) (*lksdk.RemoteTrackPublication, error)
- func (c *JobContext) WaitForTrackPublicationWithOptions(ctx context.Context, options utils.TrackPublicationWaitOptions) (*lksdk.RemoteTrackPublication, error)
- func (c *JobContext) WorkerID() string
- type JobExecutorType
- type JobProcess
- type JobRejectArguments
- type JobRequest
- type JobRoomServiceAPI
- type JobSIPAPI
- type LocalJobOptions
- type ParticipantEntrypoint
- type PlaybackFinishedEvent
- type PlaybackStartedEvent
- type PreConnectAudioBuffer
- type PreConnectAudioHandler
- type RecorderIO
- func (r *RecorderIO) OutputPath() string
- func (r *RecorderIO) PopulateSessionReport(report *agent.SessionReport)
- func (r *RecorderIO) RecordInput(frame *model.AudioFrame)
- func (r *RecorderIO) RecordOutput(frame *model.AudioFrame)
- func (r *RecorderIO) Recording() bool
- func (r *RecorderIO) RecordingStartedAt() *time.Time
- func (r *RecorderIO) Start(outputPath string, sampleRate int) error
- func (r *RecorderIO) Stop() error
- type RoomIO
- func (rio *RoomIO) AttachRoom(room *lksdk.Room)
- func (rio *RoomIO) ClearBuffer()
- func (rio *RoomIO) Close() error
- func (rio *RoomIO) Flush()
- func (rio *RoomIO) GetCallback() *lksdk.RoomCallback
- func (rio *RoomIO) LinkedParticipant() (string, bool)
- func (rio *RoomIO) OffPlaybackFinished(callback func(PlaybackFinishedEvent))
- func (rio *RoomIO) OffPlaybackStarted(callback func(PlaybackStartedEvent))
- func (rio *RoomIO) OnPlaybackFinished(callback func(PlaybackFinishedEvent))
- func (rio *RoomIO) OnPlaybackStarted(callback func(PlaybackStartedEvent))
- func (rio *RoomIO) PublishAudio(frame *model.AudioFrame) error
- func (rio *RoomIO) PublishDTMF(code int32, digit string) error
- func (rio *RoomIO) SetParticipant(participantIdentity string)
- func (rio *RoomIO) Start(ctx context.Context) error
- func (rio *RoomIO) UnsetParticipant()
- func (rio *RoomIO) WaitForPlayout(ctx context.Context) (PlaybackFinishedEvent, error)
- type RoomOptions
- type TextInputCallback
- type TextInputEvent
- type WorkerInfo
- type WorkerOptions
- type WorkerPermissions
- type WorkerRegisteredHandler
- type WorkerStartedHandler
- type WorkerType
Constants ¶
const PreConnectAudioBufferStream = "lk.agent.pre-connect-audio-buffer"
const RoomIOAgentStateAttribute = "lk.agent.state"
const RoomIOChatTopic = "lk.chat"
const RoomIOPublishOnBehalfAttribute = "lk.publish_on_behalf"
const RoomIOSimulatorAttribute = "lk.simulator"
const RoomIOTranscriptionFinalAttribute = "lk.transcription_final"
const RoomIOTranscriptionSegmentIDAttribute = "lk.segment_id"
const RoomIOTranscriptionTopic = "lk.transcription"
const RoomIOTranscriptionTrackIDAttribute = "lk.transcribed_track_id"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentServer ¶
type AgentServer struct {
Options WorkerOptions
// contains filtered or unexported fields
}
func NewAgentServer ¶
func NewAgentServer(opts WorkerOptions) *AgentServer
func (*AgentServer) ActiveJobs ¶ added in v0.0.15
func (s *AgentServer) ActiveJobs() []*JobContext
func (*AgentServer) ActiveRunningJobs ¶ added in v0.0.15
func (s *AgentServer) ActiveRunningJobs() []workeripc.RunningJobInfo
func (*AgentServer) DrainWithTimeout ¶ added in v0.0.15
func (*AgentServer) Draining ¶ added in v0.0.15
func (s *AgentServer) Draining() bool
func (*AgentServer) ExecuteLocalJob ¶
func (s *AgentServer) ExecuteLocalJob(ctx context.Context, roomName string, participantIdentity string) error
ExecuteLocalJob runs a job locally without connecting to the worker service, useful for the CLI console
func (*AgentServer) ExecuteLocalJobWithOptions ¶ added in v0.0.15
func (s *AgentServer) ExecuteLocalJobWithOptions(ctx context.Context, roomName string, participantIdentity string, options LocalJobOptions) error
func (*AgentServer) ExecuteRunningJob ¶ added in v0.0.15
func (s *AgentServer) ExecuteRunningJob(ctx context.Context, info workeripc.RunningJobInfo) error
func (*AgentServer) GetConsoleSession ¶
func (s *AgentServer) GetConsoleSession() any
GetConsoleSession retrieves the active local console session
func (*AgentServer) ID ¶ added in v0.0.15
func (s *AgentServer) ID() string
func (*AgentServer) OnWorkerRegistered ¶ added in v0.0.15
func (s *AgentServer) OnWorkerRegistered(handler WorkerRegisteredHandler)
func (*AgentServer) OnWorkerStarted ¶ added in v0.0.15
func (s *AgentServer) OnWorkerStarted(handler WorkerStartedHandler)
func (*AgentServer) RTCSession ¶
func (s *AgentServer) RTCSession( entrypoint func(*JobContext) error, request func(*JobRequest) error, sessionEnd func(*JobContext) error, ) error
func (*AgentServer) ReloadRunningJobs ¶ added in v0.0.15
func (s *AgentServer) ReloadRunningJobs(ctx context.Context, jobs []workeripc.RunningJobInfo, now time.Time) error
func (*AgentServer) RunUnregistered ¶ added in v0.0.15
func (s *AgentServer) RunUnregistered(ctx context.Context) error
func (*AgentServer) SetConsoleSession ¶
func (s *AgentServer) SetConsoleSession(session any)
SetConsoleSession allows entrypoints to register their session for console interaction
func (*AgentServer) UpdateOptions ¶ added in v0.0.15
func (s *AgentServer) UpdateOptions(opts WorkerOptions) error
func (*AgentServer) WorkerInfo ¶ added in v0.0.15
func (s *AgentServer) WorkerInfo() WorkerInfo
type AudioDecoder ¶
type AudioEncoder ¶
type AutoSubscribe ¶ added in v0.0.15
type AutoSubscribe string
const ( AutoSubscribeSubscribeAll AutoSubscribe = "subscribe_all" AutoSubscribeSubscribeNone AutoSubscribe = "subscribe_none" AutoSubscribeAudioOnly AutoSubscribe = "audio_only" AutoSubscribeVideoOnly AutoSubscribe = "video_only" )
type ConnectOptions ¶ added in v0.0.15
type ConnectOptions struct {
AutoSubscribe AutoSubscribe
}
type JobAPI ¶ added in v0.0.15
type JobAPI struct {
RoomService JobRoomServiceAPI
SIP JobSIPAPI
}
type JobAcceptArguments ¶
type JobContext ¶
type JobContext struct {
Job *livekit.Job
Room *lksdk.Room
Report *agent.SessionReport
AcceptArguments JobAcceptArguments
// contains filtered or unexported fields
}
func GetCurrentJobContext ¶ added in v0.0.15
func GetCurrentJobContext() (*JobContext, bool)
GetCurrentJobContext is an alias for GetJobContext kept for reference parity with LiveKit Agents' get_current_job_context name.
func GetJobContext ¶ added in v0.0.15
func GetJobContext() (*JobContext, bool)
GetJobContext returns the JobContext currently executing on this goroutine.
This mirrors LiveKit Agents' get_job_context helper for code that runs inside a worker job entrypoint. Go does not have Python contextvars, so newly spawned goroutines should receive the JobContext explicitly instead of relying on this helper.
func NewJobContext ¶
func RequireCurrentJobContext ¶ added in v0.0.15
func RequireCurrentJobContext() (*JobContext, error)
func RequireJobContext ¶ added in v0.0.15
func RequireJobContext() (*JobContext, error)
func (*JobContext) API ¶ added in v0.0.15
func (c *JobContext) API() *JobAPI
func (*JobContext) AddParticipantEntrypoint ¶ added in v0.0.15
func (c *JobContext) AddParticipantEntrypoint(entrypoint ParticipantEntrypoint, kinds ...livekit.ParticipantInfo_Kind) error
func (*JobContext) AddSIPParticipant ¶
func (c *JobContext) AddSIPParticipant(ctx context.Context, callTo string, trunkID string, identity string, names ...string) (*livekit.SIPParticipantInfo, error)
AddSIPParticipant adds a SIP participant to the room.
func (*JobContext) AddShutdownCallback ¶ added in v0.0.15
func (c *JobContext) AddShutdownCallback(callback any) error
func (*JobContext) Agent ¶ added in v0.0.15
func (c *JobContext) Agent() *lksdk.LocalParticipant
func (*JobContext) AvatarStartInfo ¶ added in v0.0.15
func (c *JobContext) AvatarStartInfo() agent.AvatarStartInfo
func (*JobContext) Connect ¶
func (c *JobContext) Connect(ctx context.Context, cb *lksdk.RoomCallback, options ...ConnectOptions) error
func (*JobContext) CreateSIPParticipant ¶ added in v0.0.15
func (c *JobContext) CreateSIPParticipant(ctx context.Context, req *livekit.CreateSIPParticipantRequest) (*livekit.SIPParticipantInfo, error)
func (*JobContext) DeleteRoom ¶
func (c *JobContext) DeleteRoom(ctx context.Context, roomName string) (*livekit.DeleteRoomResponse, error)
DeleteRoom deletes the room and disconnects all participants.
func (*JobContext) InitRecording ¶ added in v0.0.15
func (c *JobContext) InitRecording(options agent.RecordingOptions)
func (*JobContext) IsFakeJob ¶ added in v0.0.15
func (c *JobContext) IsFakeJob() bool
func (*JobContext) JobID ¶ added in v0.0.15
func (c *JobContext) JobID() string
func (*JobContext) LocalParticipantIdentity ¶ added in v0.0.15
func (c *JobContext) LocalParticipantIdentity() string
func (*JobContext) LogContextFields ¶ added in v0.0.15
func (c *JobContext) LogContextFields() map[string]any
func (*JobContext) MakeSessionReport ¶ added in v0.0.15
func (c *JobContext) MakeSessionReport(sessions ...*agent.AgentSession) (*agent.SessionReport, error)
func (*JobContext) MoveParticipant ¶ added in v0.0.15
func (*JobContext) ParticipantIdentity ¶ added in v0.0.15
func (c *JobContext) ParticipantIdentity() string
func (*JobContext) PrimarySession ¶ added in v0.0.15
func (c *JobContext) PrimarySession() (*agent.AgentSession, error)
func (*JobContext) Proc ¶ added in v0.0.15
func (c *JobContext) Proc() *JobProcess
func (*JobContext) PublisherInfo ¶ added in v0.0.15
func (c *JobContext) PublisherInfo() *livekit.ParticipantInfo
func (*JobContext) RoomInfo ¶ added in v0.0.15
func (c *JobContext) RoomInfo() *livekit.Room
func (*JobContext) SessionDirectory ¶ added in v0.0.11
func (c *JobContext) SessionDirectory() string
func (*JobContext) SetLogContextFields ¶ added in v0.0.15
func (c *JobContext) SetLogContextFields(fields map[string]any)
func (*JobContext) SetPrimarySession ¶ added in v0.0.15
func (c *JobContext) SetPrimarySession(session *agent.AgentSession)
func (*JobContext) SetSessionDirectory ¶ added in v0.0.15
func (c *JobContext) SetSessionDirectory(path string)
func (*JobContext) Shutdown ¶
func (c *JobContext) Shutdown(reasons ...string)
func (*JobContext) ShutdownDone ¶ added in v0.0.18
func (c *JobContext) ShutdownDone() <-chan struct{}
func (*JobContext) Tagger ¶ added in v0.0.15
func (c *JobContext) Tagger() *agent.Tagger
func (*JobContext) Terminated ¶ added in v0.0.18
func (c *JobContext) Terminated() bool
func (*JobContext) TokenClaims ¶ added in v0.0.15
func (c *JobContext) TokenClaims() (*auth.ClaimGrants, error)
func (*JobContext) TransferSIPParticipant ¶
func (c *JobContext) TransferSIPParticipant(ctx context.Context, identity string, transferTo string, playDialtones ...bool) error
TransferSIPParticipant transfers a SIP participant to another number.
func (*JobContext) TransferSIPParticipantByParticipant ¶ added in v0.0.15
func (*JobContext) WaitForAgent ¶ added in v0.0.15
func (c *JobContext) WaitForAgent( ctx context.Context, agentName ...string, ) (*lksdk.RemoteParticipant, error)
func (*JobContext) WaitForParticipant ¶ added in v0.0.15
func (c *JobContext) WaitForParticipant( ctx context.Context, identity string, kinds ...livekit.ParticipantInfo_Kind, ) (*lksdk.RemoteParticipant, error)
func (*JobContext) WaitForParticipantAttribute ¶ added in v0.0.15
func (*JobContext) WaitForTrackPublication ¶ added in v0.0.15
func (c *JobContext) WaitForTrackPublication( ctx context.Context, identity string, kinds ...livekit.TrackType, ) (*lksdk.RemoteTrackPublication, error)
func (*JobContext) WaitForTrackPublicationWithOptions ¶ added in v0.0.15
func (c *JobContext) WaitForTrackPublicationWithOptions( ctx context.Context, options utils.TrackPublicationWaitOptions, ) (*lksdk.RemoteTrackPublication, error)
func (*JobContext) WorkerID ¶ added in v0.0.15
func (c *JobContext) WorkerID() string
type JobExecutorType ¶ added in v0.0.15
type JobExecutorType = workeripc.ExecutorType
const ( JobExecutorTypeThread JobExecutorType = workeripc.ExecutorTypeThread JobExecutorTypeProcess JobExecutorType = workeripc.ExecutorTypeProcess )
type JobProcess ¶ added in v0.0.15
type JobProcess struct {
// contains filtered or unexported fields
}
func NewJobProcess ¶ added in v0.0.15
func NewJobProcess(executorType JobExecutorType, userArguments any, httpProxy string) *JobProcess
func (*JobProcess) ExecutorType ¶ added in v0.0.15
func (p *JobProcess) ExecutorType() JobExecutorType
func (*JobProcess) HTTPProxy ¶ added in v0.0.15
func (p *JobProcess) HTTPProxy() string
func (*JobProcess) PID ¶ added in v0.0.15
func (p *JobProcess) PID() int
func (*JobProcess) UserArguments ¶ added in v0.0.15
func (p *JobProcess) UserArguments() any
func (*JobProcess) Userdata ¶ added in v0.0.15
func (p *JobProcess) Userdata() map[any]any
type JobRejectArguments ¶ added in v0.0.15
type JobRejectArguments struct {
Terminate bool
}
type JobRequest ¶
func (*JobRequest) Accept ¶
func (r *JobRequest) Accept(args ...JobAcceptArguments) error
func (*JobRequest) AgentName ¶ added in v0.0.15
func (r *JobRequest) AgentName() string
func (*JobRequest) ID ¶ added in v0.0.15
func (r *JobRequest) ID() string
func (*JobRequest) Publisher ¶ added in v0.0.15
func (r *JobRequest) Publisher() *livekit.ParticipantInfo
func (*JobRequest) Reject ¶
func (r *JobRequest) Reject(args ...JobRejectArguments) error
func (*JobRequest) Room ¶ added in v0.0.15
func (r *JobRequest) Room() *livekit.Room
type JobRoomServiceAPI ¶ added in v0.0.15
type JobRoomServiceAPI interface {
DeleteRoom(context.Context, *livekit.DeleteRoomRequest) (*livekit.DeleteRoomResponse, error)
MoveParticipant(context.Context, *livekit.MoveParticipantRequest) (*livekit.MoveParticipantResponse, error)
}
type JobSIPAPI ¶ added in v0.0.15
type JobSIPAPI interface {
CreateSIPParticipant(context.Context, *livekit.CreateSIPParticipantRequest) (*livekit.SIPParticipantInfo, error)
TransferSIPParticipant(context.Context, *livekit.TransferSIPParticipantRequest) (*emptypb.Empty, error)
}
type LocalJobOptions ¶ added in v0.0.15
type ParticipantEntrypoint ¶ added in v0.0.15
type ParticipantEntrypoint func(*JobContext, *livekit.ParticipantInfo)
type PlaybackFinishedEvent ¶ added in v0.0.15
type PlaybackStartedEvent ¶ added in v0.0.15
type PreConnectAudioBuffer ¶
type PreConnectAudioBuffer struct {
Timestamp time.Time
Frames []*model.AudioFrame
}
type PreConnectAudioHandler ¶
type PreConnectAudioHandler struct {
// contains filtered or unexported fields
}
func NewPreConnectAudioHandler ¶
func NewPreConnectAudioHandler(room *lksdk.Room, timeout time.Duration) *PreConnectAudioHandler
func (*PreConnectAudioHandler) Close ¶ added in v0.0.5
func (h *PreConnectAudioHandler) Close()
func (*PreConnectAudioHandler) Register ¶
func (h *PreConnectAudioHandler) Register()
func (*PreConnectAudioHandler) WaitForData ¶
func (h *PreConnectAudioHandler) WaitForData(ctx context.Context, trackID string) []*model.AudioFrame
type RecorderIO ¶
type RecorderIO struct {
Session *agent.AgentSession
InputStartTime *time.Time
OutputStartTime *time.Time
// contains filtered or unexported fields
}
func NewRecorderIO ¶
func NewRecorderIO(session *agent.AgentSession) *RecorderIO
func (*RecorderIO) OutputPath ¶ added in v0.0.11
func (r *RecorderIO) OutputPath() string
func (*RecorderIO) PopulateSessionReport ¶ added in v0.0.15
func (r *RecorderIO) PopulateSessionReport(report *agent.SessionReport)
func (*RecorderIO) RecordInput ¶
func (r *RecorderIO) RecordInput(frame *model.AudioFrame)
func (*RecorderIO) RecordOutput ¶
func (r *RecorderIO) RecordOutput(frame *model.AudioFrame)
func (*RecorderIO) Recording ¶ added in v0.0.15
func (r *RecorderIO) Recording() bool
func (*RecorderIO) RecordingStartedAt ¶ added in v0.0.11
func (r *RecorderIO) RecordingStartedAt() *time.Time
func (*RecorderIO) Stop ¶
func (r *RecorderIO) Stop() error
type RoomIO ¶
type RoomIO struct {
Room *lksdk.Room
AgentSession *agent.AgentSession
Options RoomOptions
Recorder *RecorderIO
// contains filtered or unexported fields
}
func NewRoomIO ¶
func NewRoomIO(room *lksdk.Room, session *agent.AgentSession, opts RoomOptions) *RoomIO
func (*RoomIO) AttachRoom ¶ added in v0.0.15
func (*RoomIO) ClearBuffer ¶ added in v0.0.5
func (rio *RoomIO) ClearBuffer()
func (*RoomIO) GetCallback ¶
func (rio *RoomIO) GetCallback() *lksdk.RoomCallback
func (*RoomIO) LinkedParticipant ¶ added in v0.0.15
func (*RoomIO) OffPlaybackFinished ¶ added in v0.0.15
func (rio *RoomIO) OffPlaybackFinished(callback func(PlaybackFinishedEvent))
func (*RoomIO) OffPlaybackStarted ¶ added in v0.0.15
func (rio *RoomIO) OffPlaybackStarted(callback func(PlaybackStartedEvent))
func (*RoomIO) OnPlaybackFinished ¶ added in v0.0.5
func (rio *RoomIO) OnPlaybackFinished(callback func(PlaybackFinishedEvent))
func (*RoomIO) OnPlaybackStarted ¶ added in v0.0.5
func (rio *RoomIO) OnPlaybackStarted(callback func(PlaybackStartedEvent))
func (*RoomIO) PublishAudio ¶
func (rio *RoomIO) PublishAudio(frame *model.AudioFrame) error
func (*RoomIO) PublishDTMF ¶ added in v0.0.15
func (*RoomIO) SetParticipant ¶ added in v0.0.5
func (*RoomIO) UnsetParticipant ¶ added in v0.0.5
func (rio *RoomIO) UnsetParticipant()
func (*RoomIO) WaitForPlayout ¶ added in v0.0.5
func (rio *RoomIO) WaitForPlayout(ctx context.Context) (PlaybackFinishedEvent, error)
type RoomOptions ¶
type RoomOptions struct {
AudioTrackName string
PreConnectAudioTimeout time.Duration
DisablePreConnectAudio bool
DisableAudioInput bool
DisableTextInput bool
DisableAudioOutput bool
DisableTranscriptionOutput bool
DisableCloseOnDisconnect bool
DeleteRoomOnClose bool
DeleteRoom func(context.Context, string) error
TextInputCallback TextInputCallback
ParticipantIdentity string
ParticipantKinds []lksdk.ParticipantKind
}
type TextInputCallback ¶ added in v0.0.15
type TextInputCallback func(context.Context, *agent.AgentSession, TextInputEvent) error
type TextInputEvent ¶ added in v0.0.15
type TextInputEvent struct {
Text string
Info lksdk.TextStreamInfo
ParticipantIdentity string
}
type WorkerInfo ¶ added in v0.0.15
type WorkerOptions ¶
type WorkerOptions struct {
AgentName string
AgentNameIsEnv bool
WorkerType WorkerType
MaxRetry int
MaxRetrySet bool
Version string
Host string
Port int
PortSet bool
WSURL string
LoadFunc func(*AgentServer) float64
HealthCheck func(*AgentServer) error
SetupFunc func(*JobProcess) error
// WSRL is kept for backward compatibility. Prefer WSURL for new code.
WSRL string
APIKey string
APISecret string
WorkerToken string
HTTPProxy string
HTTPProxySet bool
UserArguments any
DevMode bool
LogLevel string
PrometheusPort int
PrometheusPortSet bool
PrometheusMultiprocDir string
LoadThreshold float64
LoadThresholdSet bool
JobMemoryWarnMB float64
JobMemoryWarnMBSet bool
JobMemoryLimitMB float64
JobMemoryLimitMBSet bool
NumIdleProcesses int
NumIdleProcessesSet bool
DrainTimeoutSeconds int
DrainTimeoutSecondsSet bool
SessionEndTimeoutSeconds float64
SessionEndTimeoutSecondsSet bool
ShutdownProcessTimeoutSeconds float64
ShutdownProcessTimeoutSecondsSet bool
InitializeProcessTimeoutSeconds float64
InitializeProcessTimeoutSecondsSet bool
Permissions *WorkerPermissions
}
type WorkerPermissions ¶ added in v0.0.15
type WorkerRegisteredHandler ¶ added in v0.0.15
type WorkerRegisteredHandler func(workerID string, serverInfo *livekit.ServerInfo)
type WorkerStartedHandler ¶ added in v0.0.15
type WorkerStartedHandler func()
type WorkerType ¶
type WorkerType string
const ( WorkerTypeRoom WorkerType = "room" WorkerTypePublisher WorkerType = "publisher" )