Documentation
¶
Index ¶
Constants ¶
View Source
const ( GoogleEndpoint = "https://www.google.com/speech-api/v2/recognize?lang=%s&output=json&key=%s" ContentType = "audio/l16; rate=16000;" )
Variables ¶
Functions ¶
func ReadAudioFile ¶
Types ¶
type Alternative ¶
type GoogleResponse ¶
type Hypothesis ¶
type Hypothesis struct {
Alternative Alternative `json:"text"`
Language Language `json:"language"`
Err error `json:-`
}
func ListenFile ¶
func ListenFile(audio []byte, key string) (*Hypothesis, error)
func (Hypothesis) String ¶
func (h Hypothesis) String() string
type Result ¶
type Result struct {
Alternatives []Alternative `json:"alternative"`
Final bool `json:"final"`
}
Click to show internal directories.
Click to hide internal directories.