stt

package
v4.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alternative

type Alternative struct {
	Confidence float32 `json:"confidence"`
	Transcript string  `json:"transcript"`
}

Alternative holds the actual text along with a Confidence

type Result

type Result struct {
	Alternatives []Alternative `json:"alternatives"`
	Final        bool          `json:"final"`
}

Result is just a list of Alternatives with a final bool. For non streaming, we can probaly ignore Final.

type TranscribeResponse

type TranscribeResponse struct {
	Results []Result `json:"results"`
	Index   int      `json:"results_index"`
}

TranscribeResponse is the top level struct which Watson speech to text gives us.

func Transcribe

func Transcribe(audioBytes []byte, contentType string, username, password string) (response TranscribeResponse, err error)

Transcribe a chunk of audio

Jump to

Keyboard shortcuts

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