yatts

package module
v3.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultYandexTTSEndpoint = "tts.api.cloud.yandex.net:443"

DefaultYandexTTSEndpoint is the default endpoint for the TTS service

Variables

This section is empty.

Functions

This section is empty.

Types

type TTS

type TTS interface {
	Speak(ctx context.Context, entity request.TextEntity, options ...request.Option) (io.Reader, error)
}

TTS is the interface for text to speech

type YaTTS

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

YaTTS is implementation of TTS based on Yandex TTS

func NewYaTTS

func NewYaTTS(
	authenticator auth.Authable,
	options ...request.Option,
) (*YaTTS, error)

NewYaTTS creates a new YaTTS instance

func (*YaTTS) SetTTSEndpointURL

func (y *YaTTS) SetTTSEndpointURL(url string)

SetTTSEndpointURL sets the endpoint for the TTS service. for cases when you need to use a hybrid

func (*YaTTS) Speak

func (y *YaTTS) Speak(ctx context.Context, entity request.TextEntity, options ...request.Option) (io.Reader, error)

Speak sends a request to the TTS endpoint and receives an audio stream.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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