speech

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidInput required input was not found
	ErrInvalidInput = errors.New("required input was not found")
)

Functions

This section is empty.

Types

type Client added in v0.1.2

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

func New

func New(ctx context.Context, opts *SpeechOptions) (*Client, error)

func (*Client) Close added in v0.1.2

func (sc *Client) Close()

func (*Client) Play added in v0.1.2

func (sc *Client) Play(ctx context.Context, text string) error

func (*Client) PlayAudio added in v0.1.2

func (sc *Client) PlayAudio(stream []byte) error

func (*Client) TextToSpeech added in v0.1.2

func (sc *Client) TextToSpeech(ctx context.Context, text string) ([]byte, error)

func (*Client) Write added in v0.1.2

func (sc *Client) Write(stream []byte) (int, error)

type SpeechOptions added in v0.1.2

type SpeechOptions struct {
	VoiceType    texttospeechpb.SsmlVoiceGender
	LanguageCode string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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