tts

package
v1.805.13 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2026 License: Apache-2.0 Imports: 9 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

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlibabacloudTextToSpeechProvider

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

func NewAlibabacloudTextToSpeechProvider

func NewAlibabacloudTextToSpeechProvider(typ string, subType string, secretKey string, voice string) (*AlibabacloudTextToSpeechProvider, error)

func (*AlibabacloudTextToSpeechProvider) GetPricing

func (p *AlibabacloudTextToSpeechProvider) GetPricing() string

func (*AlibabacloudTextToSpeechProvider) QueryAudio

func (*AlibabacloudTextToSpeechProvider) QueryAudioStream

func (p *AlibabacloudTextToSpeechProvider) QueryAudioStream(text string, ctx context.Context, writer io.Writer, lang string) (*TextToSpeechResult, error)

type TextToSpeechProvider

type TextToSpeechProvider interface {
	GetPricing() string
	QueryAudio(text string, ctx context.Context, lang string) ([]byte, *TextToSpeechResult, error)
	QueryAudioStream(text string, ctx context.Context, writer io.Writer, lang string) (*TextToSpeechResult, error)
}

func GetTextToSpeechProvider

func GetTextToSpeechProvider(typ string, subType string, clientId string, clientSecret string, providerUrl string, apiVersion string, pricePerThousandChars float64, currency string, flavor string, lang string) (TextToSpeechProvider, error)

type TextToSpeechResult

type TextToSpeechResult struct {
	TokenCount int
	Price      float64
	Currency   string
}

Jump to

Keyboard shortcuts

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