gtts

package module
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2022 License: MIT Imports: 9 Imported by: 0

README

gtts

gTTS (Google Text-to-Speech), a Golang library to interface with Google Translate's text-to-speech API. Write spoken mp3 data to a file, a file-like object (bytestring) for further audio manipulation.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Speech

type Speech struct {
	Folder   string
	Language string
	Handler  handlers.PlayerInterface
}

Speech struct

func (*Speech) CreateSpeechFile

func (speech *Speech) CreateSpeechFile(text string, fileName string) (string, error)

Creates a speech file with a given name

func (*Speech) PlaySpeechFile

func (speech *Speech) PlaySpeechFile(fileName string) error

Plays an existent .mp3 file

func (*Speech) Speak

func (speech *Speech) Speak(text string) error

Speak downloads speech and plays it using mplayer

func (*Speech) SpeakB

func (speech *Speech) SpeakB(text string) ([]byte, error)

Speak downloads speech and plays it using mplayer

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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