Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Number of audio samples per frame. FrameLength = nativePorcupine.nativeFrameLength() // Audio sample rate accepted by Picovoice. SampleRate = nativePorcupine.nativeSampleRate() // Porcupine version Version = nativePorcupine.nativeVersion() )
View Source
var BuiltInKeywords = []BuiltInKeyword{ ALEXA, AMERICANO, BLUEBERRY, BUMBLEBEE, COMPUTER, GRAPEFRUIT, GRASSHOPPER, HEY_GOOGLE, HEY_SIRI, JARVIS, OK_GOOGLE, PICOVOICE, PORCUPINE, TERMINATOR, }
List of available built-in wake words
Functions ¶
This section is empty.
Types ¶
type BuiltInKeyword ¶
type BuiltInKeyword string
BuiltInKeyword Type
const ( ALEXA BuiltInKeyword = "alexa" AMERICANO BuiltInKeyword = "americano" BLUEBERRY BuiltInKeyword = "blueberry" BUMBLEBEE BuiltInKeyword = "bumblebee" COMPUTER BuiltInKeyword = "computer" GRAPEFRUIT BuiltInKeyword = "grapefruit" GRASSHOPPER BuiltInKeyword = "grasshopper" HEY_GOOGLE BuiltInKeyword = "hey google" HEY_SIRI BuiltInKeyword = "hey siri" JARVIS BuiltInKeyword = "jarvis" OK_GOOGLE BuiltInKeyword = "ok google" PICOVOICE BuiltInKeyword = "picovoice" PORCUPINE BuiltInKeyword = "porcupine" TERMINATOR BuiltInKeyword = "terminator" )
Available built-in wake words constants
func (BuiltInKeyword) IsValid ¶
func (k BuiltInKeyword) IsValid() bool
Checks if a given BuiltInKeyword is valid
type Porcupine ¶
type Porcupine struct { // Absolute path to the file containing model parameters. ModelPath string // Sensitivity values for detecting keywords. Each value should be a number within [0, 1]. A // higher sensitivity results in fewer misses at the cost of increasing the false alarm rate. Sensitivities []float32 // List of built-in keywords to use. BuiltInKeywords []BuiltInKeyword // Absolute paths to keyword model files. KeywordPaths []string // contains filtered or unexported fields }
Porcupine struct
func (*Porcupine) Process ¶
Processes a frame of the incoming audio stream and emits the detection result. Frame of audio The number of samples per frame can be attained by calling `.FrameLength`. The incoming audio needs to have a sample rate equal to `.Sample` and be 16-bit linearly-encoded. Porcupine operates on single-channel audio. Returns a 0 based index if keyword was detected in frame. Returns -1 if no detection was made.
Click to show internal directories.
Click to hide internal directories.