Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
ai.picovoice.porcupine.PorcupineManager Class Reference

Classes

class  Builder
 
class  MicrophoneReader
 

Public Member Functions

void delete ()
 
void start ()
 
void stop () throws PorcupineException
 

Private Member Functions

 PorcupineManager (Porcupine porcupine, PorcupineManagerCallback callback, PorcupineManagerErrorCallback errorCallback)
 

Private Attributes

final PorcupineManagerCallback callback
 
final PorcupineManagerErrorCallback errorCallback
 
final MicrophoneReader microphoneReader
 
final Porcupine porcupine
 

Detailed Description

High-level Android binding for Porcupine wake word engine. It handles recording audio from microphone, processes it in real-time using Porcupine, and notifies the client when any of the given keywords are detected. For detailed information regarding Porcupine refer to $Porcupine.

Definition at line 35 of file PorcupineManager.java.

Constructor & Destructor Documentation

◆ PorcupineManager()

ai.picovoice.porcupine.PorcupineManager.PorcupineManager ( Porcupine  porcupine,
PorcupineManagerCallback  callback,
PorcupineManagerErrorCallback  errorCallback 
)
inlineprivate

Private constructor.

Parameters
porcupineAn instance of the Porcupine wake word engine.
callbackA callback function that is invoked upon detection of any of the keywords.
errorCallbackA callback that reports errors encountered while processing audio.

Definition at line 48 of file PorcupineManager.java.

Member Function Documentation

◆ delete()

void ai.picovoice.porcupine.PorcupineManager.delete ( )
inline

Releases resources acquired by Porcupine. It should be called when disposing the object.

Definition at line 62 of file PorcupineManager.java.

◆ start()

void ai.picovoice.porcupine.PorcupineManager.start ( )
inline

Starts recording audio from the microphone and monitors it for the utterances of the given set of keywords.

Definition at line 70 of file PorcupineManager.java.

◆ stop()

void ai.picovoice.porcupine.PorcupineManager.stop ( ) throws PorcupineException
inline

Stops recording audio from the microphone.

Exceptions
PorcupineExceptionif the MicrophoneReader throws an exception while it's being stopped.

Definition at line 80 of file PorcupineManager.java.

Member Data Documentation

◆ callback

final PorcupineManagerCallback ai.picovoice.porcupine.PorcupineManager.callback
private

Definition at line 38 of file PorcupineManager.java.

◆ errorCallback

final PorcupineManagerErrorCallback ai.picovoice.porcupine.PorcupineManager.errorCallback
private

Definition at line 39 of file PorcupineManager.java.

◆ microphoneReader

final MicrophoneReader ai.picovoice.porcupine.PorcupineManager.microphoneReader
private

Definition at line 36 of file PorcupineManager.java.

◆ porcupine

final Porcupine ai.picovoice.porcupine.PorcupineManager.porcupine
private

Definition at line 37 of file PorcupineManager.java.


The documentation for this class was generated from the following file:


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:15:20