Documentation
¶
Index ¶
- type AudioIO
- func (a *AudioIO) CaptureFrame(frame *model.AudioFrame) error
- func (a *AudioIO) ClearBuffer()
- func (a *AudioIO) Flush()
- func (a *AudioIO) Label() string
- func (a *AudioIO) MicFrames() <-chan *model.AudioFrame
- func (a *AudioIO) MicTapFrames() <-chan *model.AudioFrame
- func (a *AudioIO) OnAttached()
- func (a *AudioIO) OnDetached()
- func (a *AudioIO) OnPlaybackFinished(f func(ev agent.PlaybackFinishedEvent))
- func (a *AudioIO) OnPlaybackStarted(f func(ev agent.PlaybackStartedEvent))
- func (a *AudioIO) Pause()
- func (a *AudioIO) PushFrame(frame *model.AudioFrame)
- func (a *AudioIO) Resume()
- func (a *AudioIO) Start(ctx context.Context) error
- func (a *AudioIO) Stop() error
- func (a *AudioIO) Stream() <-chan *model.AudioFrame
- func (a *AudioIO) WaitForPlayout(ctx context.Context) error
- func (a *AudioIO) Write(frame *model.AudioFrame) error
- type AudioIOSource
- type ConsoleManager
- type ConsoleModel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AudioIO ¶
type AudioIO struct {
// contains filtered or unexported fields
}
AudioIO manages bidirectional audio interfacing with the host OS's microphone and speakers.
func NewAudioIO ¶
func NewAudioIO() *AudioIO
func (*AudioIO) CaptureFrame ¶ added in v0.0.5
func (a *AudioIO) CaptureFrame(frame *model.AudioFrame) error
--- agent.AudioOutput Implementation ---
func (*AudioIO) ClearBuffer ¶ added in v0.0.5
func (a *AudioIO) ClearBuffer()
func (*AudioIO) MicFrames ¶
func (a *AudioIO) MicFrames() <-chan *model.AudioFrame
func (*AudioIO) MicTapFrames ¶ added in v0.0.5
func (a *AudioIO) MicTapFrames() <-chan *model.AudioFrame
func (*AudioIO) OnAttached ¶ added in v0.0.5
func (a *AudioIO) OnAttached()
func (*AudioIO) OnDetached ¶ added in v0.0.5
func (a *AudioIO) OnDetached()
func (*AudioIO) OnPlaybackFinished ¶ added in v0.0.5
func (a *AudioIO) OnPlaybackFinished(f func(ev agent.PlaybackFinishedEvent))
func (*AudioIO) OnPlaybackStarted ¶ added in v0.0.5
func (a *AudioIO) OnPlaybackStarted(f func(ev agent.PlaybackStartedEvent))
func (*AudioIO) PushFrame ¶
func (a *AudioIO) PushFrame(frame *model.AudioFrame)
PushFrame takes audio from the Agent and queues it for the speakers
func (*AudioIO) Stream ¶ added in v0.0.5
func (a *AudioIO) Stream() <-chan *model.AudioFrame
func (*AudioIO) WaitForPlayout ¶ added in v0.0.5
type AudioIOSource ¶ added in v0.0.5
type AudioIOSource interface {
MicTapFrames() <-chan *model.AudioFrame
}
AudioIOSource represents any audio I/O that can provide mic frames
type ConsoleManager ¶ added in v0.0.5
type ConsoleManager struct {
// contains filtered or unexported fields
}
ConsoleManager is a singleton that manages console I/O for agent sessions It follows the pattern from the official Python SDK's AgentsConsole
func GetInstance ¶ added in v0.0.5
func GetInstance() *ConsoleManager
GetInstance returns the singleton ConsoleManager instance
func (*ConsoleManager) AcquireIO ¶ added in v0.0.5
func (cm *ConsoleManager) AcquireIO(ctx context.Context, session *agent.AgentSession) error
Acquire I/O for a session (like python's acquire_io) This should be called when the session starts
func (*ConsoleManager) GetAudioInput ¶ added in v0.0.5
func (cm *ConsoleManager) GetAudioInput() *AudioIO
GetAudioInput returns the console audio input
func (*ConsoleManager) IsEnabled ¶ added in v0.0.5
func (cm *ConsoleManager) IsEnabled() bool
IsEnabled returns whether console mode is enabled
func (*ConsoleManager) IsIOAcquired ¶ added in v0.0.5
func (cm *ConsoleManager) IsIOAcquired() bool
IsIOAcquired returns whether I/O has been acquired
func (*ConsoleManager) Stop ¶ added in v0.0.5
func (cm *ConsoleManager) Stop() error
Stop stops the console I/O
type ConsoleModel ¶
type ConsoleModel struct {
// contains filtered or unexported fields
}
ConsoleModel drives the interactive terminal UI
func NewConsoleModel ¶
func NewConsoleModel(ctx context.Context, audioIO AudioIOSource, session *agent.AgentSession) *ConsoleModel
func (*ConsoleModel) Init ¶
func (m *ConsoleModel) Init() tea.Cmd
func (*ConsoleModel) View ¶
func (m *ConsoleModel) View() string