Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Required number of audio samples per frame. FrameLength = ppn.FrameLength // Required sample rate of input audio SampleRate = ppn.SampleRate // Version of Porcupine being used PorcupineVersion = ppn.Version // Version of Rhino being used RhinoVersion = rhn.Version // Picovoice version Version = fmt.Sprintf("1.1.0 (Porcupine v%s) (Rhino v%s)", PorcupineVersion, RhinoVersion) )
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 { // 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 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 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 // 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(keywordPath string, wakewordCallback WakeWordCallbackType, contextPath string, inferenceCallback InferenceCallbackType) Picovoice
Returns a Picovoice stuct with default parameters
type WakeWordCallbackType ¶
type WakeWordCallbackType func()
Callback for when a wake word has been detected
Click to show internal directories.
Click to hide internal directories.