Documentation ¶
Index ¶
- Variables
- type RecognitionEngine
- type Vosk
- func (v *Vosk) Close() error
- func (v *Vosk) Dial(host string) error
- func (v *Vosk) Flush() error
- func (v *Vosk) IsAlive() bool
- func (v *Vosk) SendBinary(data []byte) error
- func (v *Vosk) SendText(text string) error
- func (v *Vosk) SetCallback(cb func(string))
- func (v *Vosk) SetPhraseList(phrase []string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var AudioDevice = &audioDevice{}
View Source
var FlushData = make([]byte, 40000)
Speech server like VOSK waits for further data after stopped speaking Normall it takes 500ms ~ several seconds to return the result. I don't find any 'official' way of telling it not wait and return result immediately, So force it stop waiting by sending a chunk of 40k zeroes
Functions ¶
This section is empty.
Types ¶
type RecognitionEngine ¶
type RecognitionEngine interface { Dial(host string) error Close() error SetCallback(func(string)) // callback will be invoked when got result from engine IsAlive() bool // websocket connection is alive SendText(text string) error SendBinary(data []byte) error SetPhraseList(phraseList []string) error Flush() error }
type Vosk ¶
type Vosk struct {
// contains filtered or unexported fields
}
func (*Vosk) SendBinary ¶
func (*Vosk) SetCallback ¶
func (*Vosk) SetPhraseList ¶
The difference between SpeechModes is 'phrase_list' Set custom 'phrase_list' when entering new SpeechMode
Click to show internal directories.
Click to hide internal directories.