tts

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SynthesizeAndStore

func SynthesizeAndStore(
	ctx context.Context,
	provider TTSProvider,
	store media.MediaStore,
	text string,
	filename string,
	channel string,
	chatID string,
) (string, error)

SynthesizeAndStore synthesizes text to speech and registers it in the media store, returning the media reference.

Types

type MimoTTSProvider

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

func NewMimoTTSProvider

func NewMimoTTSProvider(apiKey string, apiBase string, model string, proxyURL string) *MimoTTSProvider

func (*MimoTTSProvider) Name

func (t *MimoTTSProvider) Name() string

func (*MimoTTSProvider) Synthesize

func (t *MimoTTSProvider) Synthesize(ctx context.Context, text string) (io.ReadCloser, error)

type OpenAITTSOptions

type OpenAITTSOptions struct {
	Voice          string
	ResponseFormat string
}

type OpenAITTSProvider

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

func NewOpenAITTSProvider

func NewOpenAITTSProvider(apiKey string, apiBase string, proxyURL string, model string) *OpenAITTSProvider

func NewOpenAITTSProviderWithOptions

func NewOpenAITTSProviderWithOptions(
	apiKey string,
	apiBase string,
	proxyURL string,
	model string,
	options OpenAITTSOptions,
) *OpenAITTSProvider

func (*OpenAITTSProvider) Name

func (t *OpenAITTSProvider) Name() string

func (*OpenAITTSProvider) Synthesize

func (t *OpenAITTSProvider) Synthesize(ctx context.Context, text string) (io.ReadCloser, error)

type TTSProvider

type TTSProvider interface {
	Name() string
	Synthesize(ctx context.Context, text string) (io.ReadCloser, error)
}

func DetectTTS

func DetectTTS(cfg *config.Config) TTSProvider

Jump to

Keyboard shortcuts

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