Gotts
Golang Text To Speech package. Included CLI tool to generate sound file from text.
Basically a text-to-speech, and save it for you to a file. This tool works over Google Translate's API hence needing internet to actually work.
Usage
package main
import (
"fmt"
"github.com/shrotavre/gotts"
)
func main() {
g := gotts.NewGotts()
opt := gotts.Options{}.FillDefaults()
url, err := g.MakeSpeechURL("Hello world!", opt)
if err != nil {
panic(err)
}
fmt.Println("Speech URL acquired: ", url)
opt = gotts.Options{Lang: "id"}.FillDefaults()
err = g.MakeSpeechFile("Halo dunia!", opt)
if err != nil {
panic(err)
}
fmt.Println("Speech file generated!")
}
CLI Usage
Installation
Download binary version from release page matching your operating system.
Usage
You can use gotts
by executing the downloaded binary via your cli and supply the required arguments.
$ ./gotts text="Hello from Shrotavre!"
$ ./gotts text="Hello!" dir="/Documents/voices" name="test.mpg"
$ ./gotts text="Halo, apa kabar?" lang="id"
$ ./gotts text="Hello!" speed=6
Contributing
Documentation is an OPEN Open Source Project. This means that:
Individuals making significant and valuable contributions are given
commit-access to the project to contribute as they see fit.