googletts

package
Version: v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2018 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateToken

func CalculateToken(text string, key1, key2 int64) string

CalculateToken caluculates token from tts text and seed keys.

func GetTTSToken

func GetTTSToken(text string) (string, error)

GetTTSToken gets TTS token.

func GetTTSURL

func GetTTSURL(text, lang string) (string, error)

GetTTSURL gets tts url for the given text.

func GetTTSURLWithOption

func GetTTSURLWithOption(opt Option) (string, error)

GetTTSURLWithOption gets tts url with option.

Types

type Option

type Option struct {
	Client     string
	Encoding   string
	Lang       string
	Text       string
	TextLength int
	Token      string
	TTSSpeed   float64 // voice speed (0.0 - 1.0)
}

Option contains optional parameters for Google TTS API.

func (Option) Validate

func (o Option) Validate() error

Validate validates option parameters.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL