Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertToWav ¶
ConvertToWav convert files mp3 to Wav
func SetSessionModel ¶
func SetSessionModel(m string)
Types ¶
type Credentials ¶
type Credentials struct { Username string `json:"username"` Password string `json:"password"` Session string `json:"session"` }
Credentials is struct to save informations api
func (*Credentials) MakeSessionURL ¶
func (c *Credentials) MakeSessionURL() string
MakeSessionURL Getting session url with username and password environments
type ErrorResponse ¶
type ErrorResponse struct { Error string `json:"error"` CodeDescription string `json:"code_description"` }
ErrorResponse struct of errors
type RecognizeBody ¶
type RecognizeBody struct { State string `json:"state"` Model string `json:"model"` Recognize string `json:"recognize"` ObserveResult string `json:"observe_result"` }
RecognizeBody body response
type RecognizeResponse ¶
type RecognizeResponse struct { ResultIndex int `json:"result_index"` Results []Result `json:"results"` }
RecognizeResponse strct
type RecognizeStatus ¶
type RecognizeStatus struct {
Session RecognizeBody `json:"session"`
}
RecognizeStatus Get status from /recgonize api. checks that Speech-to-text api is available for new recognition
type Result ¶
type Result struct { Final bool `json:"final"` Alternatives []map[string]interface{} `json:"alternatives"` }
Result strct
type SessionRsp ¶
type SessionRsp struct { SessionID string `json:"session_id"` NewSessionURI string `json:"new_session_uri"` Recognize string `json:"recognize"` ObserveResult string `json:"observe_result"` CJar *cookiejar.Jar }
SessionRsp is struct to save session informations from request
func (*SessionRsp) DeleteSession ¶
func (s *SessionRsp) DeleteSession() error
DeleteSession remove session
func (*SessionRsp) GetRecognize ¶
func (s *SessionRsp) GetRecognize() (RecognizeStatus, error)
GetRecognize -<
Click to show internal directories.
Click to hide internal directories.