GoogleAPI

package
v0.0.0-...-ae10f35 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2019 License: BSD-3-Clause Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClient

func GetClient(c ClientConfig) *http.Client

GetClient Get the client configured to send authenticated requests

func SpeechToText

func SpeechToText(client *http.Client, c AudioConfig) (string, error)

SpeechToText get the speech to text

func TextToSpeech

func TextToSpeech(client *http.Client, c TextConfig) (string, error)

TextToSpeech get the text to speech

Types

type AudioConfig

type AudioConfig struct {
	FilePath        string
	LanguageCode    string
	AudioEncoding   string
	AudioSampleRate int64
}

AudioConfig Google Speech-to-Text config

type ClientConfig

type ClientConfig struct {
	Email      string
	PrivateKey string
	TokenURL   string `default:"https://accounts.google.com/o/oauth2/token"`
}

ClientConfig Google Speech-to-Text config

type TextConfig

type TextConfig struct {
	Text          string
	LanguageCode  string
	AudioEncoding string
}

TextConfig Google Speech-to-Text config

Jump to

Keyboard shortcuts

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