speech

package
v0.0.0-...-6d3e6ed Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package speech wraps the Cloud Speech API and provides an auth method that allows you to check an input audio file for an input term.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthResult

type AuthResult struct {
	Result bool                        `json:"result"`
	Raw    *speechpb.RecognizeResponse `json:"raw"`
}

AuthResult is the return from auth operations. It allows us to show tbe pure result and the work.

func Auth

func Auth(term string, rate, channels int32, file string) (AuthResult, error)

Auth takes an audio file and a term and compares them to each other to see if the an item matching the input term is contained in the audio file

func AuthFromReader

func AuthFromReader(term string, rate, channels int32, file io.Reader) (AuthResult, error)

AuthFromReader takes a reader containing an audio file and a term and compares them to each other to see if the an item matching the input term is contained in the audio file

func (*AuthResult) AuthTerm

func (l *AuthResult) AuthTerm(term string) error

AuthTerm does the check to see if the language query worked

Jump to

Keyboard shortcuts

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