Documentation
¶
Index ¶
- Constants
- func BuildLaunchAgentPlist(cfg LaunchAgentConfig) string
- func DefaultLaunchAgentPath(label string) (string, error)
- func InstallLaunchAgent(path string, content string) error
- func Start(ctx context.Context, opts StartOptions) error
- type DoctorCheck
- type DoctorOptions
- type DoctorReport
- type LaunchAgentConfig
- type PushToTalkState
- type Speaker
- type StartOptions
- type Transcriber
- type VoiceChatClient
- type VoiceTurnDeps
- type VoiceTurnResult
Constants ¶
View Source
const ( DefaultHotkey = "Ctrl+Option+Space" DefaultAudioInput = "default" )
View Source
const DefaultLaunchAgentLabel = "io.tars.assistant"
Variables ¶
This section is empty.
Functions ¶
func BuildLaunchAgentPlist ¶
func BuildLaunchAgentPlist(cfg LaunchAgentConfig) string
func DefaultLaunchAgentPath ¶
func InstallLaunchAgent ¶
Types ¶
type DoctorCheck ¶
type DoctorOptions ¶
type DoctorReport ¶
type DoctorReport struct {
OK bool `json:"ok"`
Checks []DoctorCheck `json:"checks"`
Missing []string `json:"missing,omitempty"`
Notes []string `json:"notes,omitempty"`
}
func RunDoctor ¶
func RunDoctor(opts DoctorOptions) DoctorReport
type LaunchAgentConfig ¶
type PushToTalkState ¶
type PushToTalkState struct {
// contains filtered or unexported fields
}
func (*PushToTalkState) HandlePressed ¶
func (s *PushToTalkState) HandlePressed() bool
func (*PushToTalkState) HandleReleased ¶
func (s *PushToTalkState) HandleReleased() bool
func (*PushToTalkState) Recording ¶
func (s *PushToTalkState) Recording() bool
type StartOptions ¶
type Transcriber ¶
type VoiceChatClient ¶
type VoiceTurnDeps ¶
type VoiceTurnDeps struct {
Transcriber Transcriber
ChatClient VoiceChatClient
Speaker Speaker
SessionID string
}
type VoiceTurnResult ¶
type VoiceTurnResult struct {
Transcript string
AssistantReply string
SessionID string
TTSError string
}
func RunTextTurn ¶
func RunTextTurn(ctx context.Context, deps VoiceTurnDeps, text string) (VoiceTurnResult, error)
func RunVoiceTurn ¶
func RunVoiceTurn(ctx context.Context, deps VoiceTurnDeps, audioPath string) (VoiceTurnResult, error)
Click to show internal directories.
Click to hide internal directories.