mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-25 07:00:48 +09:00
21 lines
466 B
Go
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)
|
|
}
|