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
Click to show internal directories.
Click to hide internal directories.