Skip to content

evalphobia/google-tts-go

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

Google TTS (Text-To-Speech) for golang

GoDoc License: MIT 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.

About

Google TTS (Text-To-Speech) for golang

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages