Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type InferenceCallbackType ¶
type InferenceCallbackType func(rhn.RhinoInference)
Callback for when Rhino has made an inference
type Picovoice ¶
type Picovoice struct { // AccessKey obtained from Picovoice Console (https://console.picovoice.ai/). AccessKey string // Path to Porcupine keyword file (.ppn) KeywordPath string // Function to be called once the wake word has been detected WakeWordCallback WakeWordCallbackType // Path to Rhino context file (.rhn) ContextPath string // Function to be called once Rhino has an inference ready InferenceCallback InferenceCallbackType // Path to Porcupine dynamic library file (.so/.dylib/.dll) PorcupineLibraryPath string // Path to Porcupine model file (.pv) PorcupineModelPath string // Sensitivity value for detecting keyword. The value should be a number within [0, 1]. A // higher sensitivity results in fewer misses at the cost of increasing the false alarm rate. PorcupineSensitivity float32 // Path to Rhino dynamic library file (.so/.dylib/.dll) RhinoLibraryPath string // Path to Rhino model file (.pv) RhinoModelPath string // Inference sensitivity. A higher sensitivity value results in // fewer misses at the cost of (potentially) increasing the erroneous inference rate. // Sensitivity should be a floating-point number within 0 and 1. RhinoSensitivity float32 // Endpoint duration in seconds. An endpoint is a chunk of silence at the end of an // utterance that marks the end of spoken command. It should be a positive number within [0.5, 5]. A lower endpoint // duration reduces delay and improves responsiveness. A higher endpoint duration assures Rhino doesn't return inference // pre-emptively in case the user pauses before finishing the request. EndpointDurationSec float32 // If set to `true`, Rhino requires an endpoint (chunk of silence) before finishing inference. RequireEndpoint bool // Once initialized, stores the source of the Rhino context in YAML format. Shows the list of intents, // which expressions map to those intents, as well as slots and their possible values. ContextInfo string // contains filtered or unexported fields }
Picovoice struct
func NewPicovoice ¶
func NewPicovoice( accessKey string, keywordPath string, wakewordCallback WakeWordCallbackType, contextPath string, inferenceCallback InferenceCallbackType) Picovoice
Returns a Picovoice struct with default parameters
type PicovoiceError ¶
func (*PicovoiceError) Error ¶
func (e *PicovoiceError) Error() string
type PvStatus ¶
type PvStatus int
PvStatus describes error codes returned from native code
const ( SUCCESS PvStatus = 0 OUT_OF_MEMORY PvStatus = 1 IO_ERROR PvStatus = 2 INVALID_ARGUMENT PvStatus = 3 STOP_ITERATION PvStatus = 4 KEY_ERROR PvStatus = 5 INVALID_STATE PvStatus = 6 RUNTIME_ERROR PvStatus = 7 ACTIVATION_ERROR PvStatus = 8 ACTIVATION_LIMIT_REACHED PvStatus = 9 ACTIVATION_THROTTLED PvStatus = 10 ACTIVATION_REFUSED PvStatus = 11 )
type WakeWordCallbackType ¶
type WakeWordCallbackType func()
Callback for when a wake word has been detected
Click to show internal directories.
Click to hide internal directories.