Cobra Voice Activity Detection
Class for the Cobra Voice Activity Detection engine.
accessKeystring : AccessKey obtained from Picovoice Console.
optionsCobraOptions: Optional configuration arguments:
libraryPathstring : Path to the Cobra dynamic library (
Cobra: An instance of Cobra platform.
Releases resources acquired by
Getter for number of audio samples per frame.
number: Number of audio samples per frame.
Getter for audio sample rate accepted by Cobra.
number: Audio sample rate accepted by Cobra.
Getter for version.
Processes a frame of the incoming audio stream with the voice activity detection engine. The number of samples per frame can be attained by calling
.frameLength. The incoming audio needs to have a sample rate equal to
.sampleRate and be 16-bit linearly-encoded. Cobra operates on single-channel audio.
pcmArray<number> : A frame of audio samples.
number: Probability of voice activity. It is a floating-point number within [0, 1].
Exceptions thrown if an error occurs within
Cobra Voice Activity Detection engine.