Files
Memoh/internal/tts/adapter.go
T
2026-03-13 02:49:52 +08:00

21 lines
466 B
Go

package tts
import "context"
type TtsType string
type TtsMeta struct {
Provider string
Description string
}
type TtsAdapter interface {
Type() TtsType
Meta() TtsMeta
DefaultModel() string
Models() []ModelInfo
ResolveModel(model string) (string, error)
Synthesize(ctx context.Context, text string, model string, config AudioConfig) ([]byte, error)
Stream(ctx context.Context, text string, model string, config AudioConfig) (chan []byte, chan error)
}