voice

package
v0.1.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2026 License: MIT Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const TextToSpeechToolID = "text_to_speech"

Variables

View Source
var (
	ErrModuleDisabled      = errors.New("voice module is disabled")
	ErrUnsupportedProvider = errors.New("voice provider is not supported yet")
	ErrProviderUnavailable = errors.New("voice provider is unavailable")
	ErrInvalidRequest      = errors.New("invalid voice request")
)

Functions

func NewTextToSpeechTool

func NewTextToSpeechTool(setupService setupLoader) tools.Executor

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(setupService setupLoader) *Service

func (*Service) SpeechToText

func (*Service) TextToSpeech

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 TextToSpeechRequest struct {
	Text     string `json:"text"`
	VoiceID  string `json:"voice_id,omitempty"`
	Language string `json:"language,omitempty"`
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL