Documentation
¶
Overview ¶
Package voice is the local text-to-speech and speech-to-text modules.
Index ¶
- Constants
- Variables
- type Module
- func (m *Module) Apply(_ context.Context, cfg setup.Config) error
- func (m *Module) Change(ctx context.Context, path []string, value string) (modules.Change, error)
- func (m *Module) Close() error
- func (m *Module) Context() string
- func (m *Module) ID() string
- func (m *Module) Settings(context.Context) []modules.Item
- func (m *Module) SpeechToText(ctx context.Context, req SpeechToTextRequest) (SpeechToTextResponse, error)
- func (m *Module) Status(context.Context) modules.Status
- func (m *Module) TextToSpeech(ctx context.Context, req TextToSpeechRequest) (TextToSpeechResponse, error)
- func (m *Module) Tools() []tools.Executor
- type SpeechToTextRequest
- type SpeechToTextResponse
- type TextToSpeechRequest
- type TextToSpeechResponse
Constants ¶
const TextToSpeechToolID = "text_to_speech"
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Module ¶ added in v0.2.0
type Module struct {
// contains filtered or unexported fields
}
Module is the TTS or the STT module; both run on the daemon's local runtime.
func (*Module) Apply ¶ added in v0.2.0
Apply stores the module's settings and, when they changed, starts the selected always-running runtime in the background and stops the others.
func (*Module) Change ¶ added in v0.2.0
Change chooses the provider, installs or deletes an engine, adds, uses or deletes a model or voice, or sets one of a provider's settings.
func (*Module) Settings ¶ added in v0.2.0
Settings are the provider choice, a page per provider (engine, models or voices, language, threads, run mode) and the module's status.
func (*Module) SpeechToText ¶ added in v0.2.0
func (m *Module) SpeechToText(ctx context.Context, req SpeechToTextRequest) (SpeechToTextResponse, error)
func (*Module) TextToSpeech ¶ added in v0.2.0
func (m *Module) TextToSpeech(ctx context.Context, req TextToSpeechRequest) (TextToSpeechResponse, error)
type SpeechToTextRequest ¶
type SpeechToTextRequest struct {
ContentBase64 string `json:"content_base64"`
FileName string `json:"file_name,omitempty"`
MIMEType string `json:"mime_type,omitempty"`
Language string `json:"language,omitempty"`
}
func NewSpeechToTextRequest ¶
func NewSpeechToTextRequest(content []byte, fileName string, mimeType string) SpeechToTextRequest
func (SpeechToTextRequest) ContentBytes ¶
func (r SpeechToTextRequest) ContentBytes() ([]byte, error)
type SpeechToTextResponse ¶
type SpeechToTextResponse struct {
Text string `json:"text"`
}
type TextToSpeechRequest ¶
type TextToSpeechResponse ¶
type TextToSpeechResponse struct {
ContentBase64 string `json:"content_base64"`
MIMEType string `json:"mime_type"`
FileName string `json:"file_name"`
}
func NewTextToSpeechResponse ¶
func NewTextToSpeechResponse(content []byte, mimeType string, fileName string) TextToSpeechResponse
func (TextToSpeechResponse) ContentBytes ¶
func (r TextToSpeechResponse) ContentBytes() ([]byte, error)
Directories
¶
| Path | Synopsis |
|---|---|
|
providers/gemini
Package gemini is the Gemini Live realtime voice provider.
|
Package gemini is the Gemini Live realtime voice provider. |
|
providers/grok
Package grok is the xAI Grok Voice realtime voice provider.
|
Package grok is the xAI Grok Voice realtime voice provider. |
|
providers/openai
Package openai is the OpenAI Realtime voice provider.
|
Package openai is the OpenAI Realtime voice provider. |