Documentation ¶
Overview ¶
Package api provides methods to contact the Aurora API and process the given requests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type InterpretResponse ¶
type InterpretResponse struct { // Text is the original query Text string `json:"text"` // Intent is the intent of the user. It is an empty string if the // user's intent was unclear Intent string `json:"intent"` // Entities is a map of the entities in the user's query. The keys // are the entity name (like song or location) and the value // is the detected value for that entitity Entities map[string]string `json:"entities"` }
InterpretResponse is the response returned by the API if the text was successfully able to be interpreted.
func GetInterpret ¶
func GetInterpret(c *config.Config, text string) (*InterpretResponse, error)
GetInterpret queries the API with the provided text and returns the interpreted response.
type STTResponse ¶
type STTResponse struct {
Transcript string `json:"transcript"`
}
STTResponse is the response returned by the API if the speech was successfully able to be transcribed.
func GetSTT ¶
GetSTT queries the API with the provided audio file and returns a transcript of the speech.
func GetSTTFromStream ¶
GetSTTFromStream queries the API with the provided raw WAV audio stream and returns a transcript of the speech.
Click to show internal directories.
Click to hide internal directories.