tts
github.com/nubunto/tts
go get github.com/nubunto/tts
tts

github.com/nubunto/tts

TTS from google translate

go get github.com/nubunto/tts
Readme

TTS, from Google Translate

Google Translate API wrapper in Go for converting Text to Speech.

Example

Save speech to a file

package main

import (
    "io/ioutil"
    "log"
    "os"

    "github.com/nubunto/tts"
)

func main() {
    s, err := tts.Speak(tts.Config{
        Speak:    "olá!",
        Language: "pt-BR",
    })
    if err != nil {
        log.Fatal(err)
    }

    err = ioutil.WriteFile("output.mp3", s.Bytes(), os.ModePerm)
    if err != nil {
        log.Fatal(err)
    }

}

Note: Highly experimental. Not sure if Google imposes any kind of rate-limiting, but I've decided not to treat for that for now. Documentation is scarse (non-existent, to be honest) and tests are, well, optmistic, to say the least. Use it at your own risk.

GitHub Stars

11

LAST COMMIT

6yrs ago

MAINTAINERS

0

CONTRIBUTORS

3

OPEN ISSUES

0

OPEN PRs

0
VersionTagPublished
v0.0.0-20160718193239-d183cb25a053
2yrs ago
No alternatives found
No tutorials found
Add a tutorial