google-tts-go

module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2018 License: MIT

README

Google TTS (Text-To-Speech) for golang

GoDoc Release Build Status Co decov Coverage Go Report Card Code Climate BCH compliance

google-tts-go is a golang implementation of the token validation of Google Translate.

Quick Usage

package main

import (
	"fmt"

	"github.com/evalphobia/google-tts-go/googletts"
)

func main() {
	url, err := googletts.GetTTSURL("Hello world.", "en")
	if err != nil {
		panic(err)
	}
	fmt.Println(url) // => https://translate.google.com/translate_tts?client=t&ie=UTF-8&q=Hello%2C+world.&textlen=13&tk=368668.249914&tl=en

	tk, err := googletts.GetTTSToken("Hello world.")
	if err != nil {
		panic(err)
	}
	fmt.Println(tk) // => 368668.249914
}

Credit

The algorithm of this library is based on Boudewijn26/gTTS-token by Boudewijn26.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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