gotts

package module
v0.0.0-...-2c25432 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2022 License: MIT Imports: 8 Imported by: 1

README

Install

go get "github.com/col3name/gotts"

Update

go get -u "github.com/col3name/gotts"

Remove

go clean -i "github.com/col3name/gotts"

Import

import "github.com/col3name/gotts"
import "github.com/col3name/gotts/voices"

Use

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

Use with Handlers

import (
    "github.com/col3name/gotts"
    handlers "github.com/col3name/gotts/handlers"
    voices "github.com/col3name/gotts/voices"
)

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

Have Fun!

Documentation

Index

Constants

View Source
const AudioFolder = "audio"

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 NewSpeech

func NewSpeech(language string, volume float64) *Speech

func (*Speech) CreateSpeechFile

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

func (*Speech) PlaySpeechFile

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

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