Documentation
¶
Index ¶
- Constants
- func VoiceLanguageOfVoice(voiceID string) string
- type Runtime
- func (r *Runtime) ApplyBrowserAction(ctx context.Context, provider setup.BrowserProviderOption, ...) (setup.BrowserProviderOption, error)
- func (r *Runtime) ApplyVoiceAction(ctx context.Context, moduleID string, provider VoiceProvider, ...) (VoiceProvider, error)
- func (r *Runtime) Close() error
- func (r *Runtime) DecorateBrowserModule(module setup.BrowserModuleDescriptor) setup.BrowserModuleDescriptor
- func (r *Runtime) DecorateBrowserProvider(provider setup.BrowserProviderOption) setup.BrowserProviderOption
- func (r *Runtime) DecorateVoiceModules(modules []VoiceModule) []VoiceModule
- func (r *Runtime) DecorateVoiceProvider(moduleID string, provider VoiceProvider) VoiceProvider
- func (r *Runtime) ManagedVoiceBinaryPath(provider VoiceProvider) (string, error)
- func (r *Runtime) PiperTextToSpeech(ctx context.Context, provider VoiceProvider, text string) ([]byte, error)
- func (r *Runtime) PlaywrightMCPServerConfig(provider setup.BrowserProviderOption) (setup.MCPServerConfig, bool)
- func (r *Runtime) StopVoiceRuntime(providerID string)
- func (r *Runtime) SupertonicTextToSpeech(ctx context.Context, provider VoiceProvider, text string) ([]byte, error)
- func (r *Runtime) VoiceBinaryPath(provider VoiceProvider) (string, error)
- func (r *Runtime) VoiceModelInstalled(moduleID string, provider VoiceProvider) (bool, string)
- func (r *Runtime) VoiceModelInstalledForID(moduleID string, provider VoiceProvider, modelID string) (bool, string)
- func (r *Runtime) VoiceModelPath(moduleID string, provider VoiceProvider) string
- func (r *Runtime) VoiceModelPathForID(moduleID string, provider VoiceProvider, modelID string) string
- func (r *Runtime) VoiceRuntimeRSSBytes(provider VoiceProvider) uint64
- func (r *Runtime) WhisperCLIPath(provider VoiceProvider) (string, error)
- func (r *Runtime) WhisperServerPath(provider VoiceProvider) (string, error)
- func (r *Runtime) WhisperSpeechToText(ctx context.Context, provider VoiceProvider, input WhisperSpeechInput) (string, error)
- type VoiceActionRequest
- type VoiceModel
- type VoiceModule
- type VoiceProvider
- type WhisperSpeechInput
Constants ¶
const ( ActionDownload = "download" ActionDelete = "delete" ActionInstallRuntime = "install-runtime" ActionDeleteRuntime = "delete-runtime" ActionStart = "start" ActionStop = "stop" RuntimeNotImplemented = "not_implemented" RuntimeRunning = "running" RuntimeStopped = "stopped" )
Variables ¶
This section is empty.
Functions ¶
func VoiceLanguageOfVoice ¶ added in v0.2.0
VoiceLanguageOfVoice is the language code a Piper voice id starts with.
Types ¶
type Runtime ¶
type Runtime struct {
// Offline keeps the bundled voice catalogs instead of fetching the
// online ones.
Offline bool
// contains filtered or unexported fields
}
Runtime manages local voice and browser runtimes; the daemon builds one and closes it on shutdown, which stops the processes it started.
func (*Runtime) ApplyBrowserAction ¶ added in v0.1.15
func (r *Runtime) ApplyBrowserAction(ctx context.Context, provider setup.BrowserProviderOption, request setup.BrowserProviderActionRequest) (setup.BrowserProviderOption, error)
func (*Runtime) ApplyVoiceAction ¶
func (r *Runtime) ApplyVoiceAction(ctx context.Context, moduleID string, provider VoiceProvider, request VoiceActionRequest) (VoiceProvider, error)
func (*Runtime) DecorateBrowserModule ¶ added in v0.1.15
func (r *Runtime) DecorateBrowserModule(module setup.BrowserModuleDescriptor) setup.BrowserModuleDescriptor
func (*Runtime) DecorateBrowserProvider ¶ added in v0.1.15
func (r *Runtime) DecorateBrowserProvider(provider setup.BrowserProviderOption) setup.BrowserProviderOption
func (*Runtime) DecorateVoiceModules ¶
func (r *Runtime) DecorateVoiceModules(modules []VoiceModule) []VoiceModule
func (*Runtime) DecorateVoiceProvider ¶
func (r *Runtime) DecorateVoiceProvider(moduleID string, provider VoiceProvider) VoiceProvider
func (*Runtime) ManagedVoiceBinaryPath ¶ added in v0.1.10
func (r *Runtime) ManagedVoiceBinaryPath(provider VoiceProvider) (string, error)
func (*Runtime) PiperTextToSpeech ¶
func (*Runtime) PlaywrightMCPServerConfig ¶ added in v0.1.15
func (r *Runtime) PlaywrightMCPServerConfig(provider setup.BrowserProviderOption) (setup.MCPServerConfig, bool)
func (*Runtime) StopVoiceRuntime ¶ added in v0.2.0
StopVoiceRuntime stops the provider's server when one runs.
func (*Runtime) SupertonicTextToSpeech ¶ added in v0.1.10
func (*Runtime) VoiceBinaryPath ¶
func (r *Runtime) VoiceBinaryPath(provider VoiceProvider) (string, error)
func (*Runtime) VoiceModelInstalled ¶
func (r *Runtime) VoiceModelInstalled(moduleID string, provider VoiceProvider) (bool, string)
func (*Runtime) VoiceModelInstalledForID ¶
func (*Runtime) VoiceModelPath ¶
func (r *Runtime) VoiceModelPath(moduleID string, provider VoiceProvider) string
func (*Runtime) VoiceModelPathForID ¶
func (r *Runtime) VoiceModelPathForID(moduleID string, provider VoiceProvider, modelID string) string
func (*Runtime) VoiceRuntimeRSSBytes ¶
func (r *Runtime) VoiceRuntimeRSSBytes(provider VoiceProvider) uint64
func (*Runtime) WhisperCLIPath ¶
func (r *Runtime) WhisperCLIPath(provider VoiceProvider) (string, error)
func (*Runtime) WhisperServerPath ¶
func (r *Runtime) WhisperServerPath(provider VoiceProvider) (string, error)
func (*Runtime) WhisperSpeechToText ¶
func (r *Runtime) WhisperSpeechToText(ctx context.Context, provider VoiceProvider, input WhisperSpeechInput) (string, error)
type VoiceActionRequest ¶ added in v0.2.0
VoiceActionRequest is a provider action and the model it applies to.
type VoiceModel ¶ added in v0.2.0
type VoiceModel struct {
ID string
Name string
Size string
RAM string
Description string
Default bool
LanguageCode string
LanguageName string
Country string
Quality string
Installed bool
Path string
}
VoiceModel is a model (STT) or a voice (TTS) a provider can download.
type VoiceModule ¶ added in v0.2.0
type VoiceModule struct {
ID string
Title string
Enabled bool
ProviderID string
ProviderName string
Local bool
Status string
Config setup.VoiceProviderConfig
Providers []VoiceProvider
}
VoiceModule is the TTS or the STT module: its settings, its providers and, once decorated, their install and run state.
func VoiceModules ¶ added in v0.2.0
func VoiceModules(modules setup.ModulesConfig) []VoiceModule
VoiceModules are the TTS and STT modules of the config, undecorated.
type VoiceProvider ¶ added in v0.2.0
type VoiceProvider struct {
ID string
Name string
Local bool
Status string
Endpoint string
Downloaded bool // the selected model or voice is installed
ModelPath string
RuntimeState string
RuntimeDetail string
RuntimePath string
RuntimeInstalled bool
RuntimeRSS uint64
Config setup.VoiceProviderConfig
Models []VoiceModel
}
VoiceProvider is a local voice engine with its effective settings.