tts

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoogleTTS

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

GoogleTTS struct with default options to use

func NewGoogleTTS

func NewGoogleTTS() *GoogleTTS

NewGoogleTTS returns a new instance with default options

func (*GoogleTTS) Close

func (t *GoogleTTS) Close() error

Close discard the underlying mp3 player

func (*GoogleTTS) MustSay

func (t *GoogleTTS) MustSay(lang, text string, opts *SayOptions)

MustSay is a helper that wraps a call to Say() and panics if the error is non-nil.

func (*GoogleTTS) Say

func (t *GoogleTTS) Say(l, text string, opts *SayOptions) error

Say will play an audio of the given text

func (*GoogleTTS) SetCacheDir

func (t *GoogleTTS) SetCacheDir(path string) error

SetCacheDir set a new path to save mp3 files. it fails if path doesn't exist

type SayOptions

type SayOptions struct {
	Slow    bool
	NoCache bool
}

SayOptions struct with all options you can pass to Say()

Jump to

Keyboard shortcuts

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