htgotts

package module
v0.0.0-...-0585e37 Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: MIT Imports: 8 Imported by: 0

README

HTGO-TTS

htgo-tts

https://hegedustibor.github.io/htgo-tts/

Install
go get "github.com/hegedustibor/htgo-tts"
Update
go get -u "github.com/hegedustibor/htgo-tts"
Remove
go clean -i "github.com/hegedustibor/htgo-tts"
Add to go.mod file

replace github.com/hegedustibor/htgo-tts latest => github.com/col3name/htgo-tts latest

Import
import "github.com/col3name/htgo-tts"
import "github.com/col3name/htgo-tts/voices"
Use
speech := htgotts.Speech{Folder: "audio", Language: voices.English, Volume: 0, Speed: 1}
speech.Speak("Your sentence.")
Use with Handlers
import (
    htgotts "github.com/col3name/htgo-tts"
    handlers "github.com/col3name/htgo-tts/handlers"
    voices "github.com/col3name/htgo-tts/voices"
)

speech := htgotts.Speech{Folder: "audio", Language: voices.English, Volume: 0, Speed: 1}
speech.Speak("Your sentence.")

Have Fun!

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
	Volume   float64
	Speed    float64
}

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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