Class PorcupineManager

java.lang.Object
ai.picovoice.porcupine.PorcupineManager

public class PorcupineManager
extends java.lang.Object
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.
  • Nested Class Summary

    Nested Classes
    Modifier and Type Class Description
    static class  PorcupineManager.Builder
    Builder for creating an instance of PorcupineManager with a mixture of default arguments
  • Method Summary

    Modifier and Type Method Description
    void delete()
    Releases resources acquired by Porcupine.
    void start()
    Starts recording audio from the microphone and monitors it for the utterances of the given set of keywords.
    void stop()
    Stops recording audio from the microphone.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • delete

      public void delete()
      Releases resources acquired by Porcupine. It should be called when disposing the object.
    • start

      public void start()
      Starts recording audio from the microphone and monitors it for the utterances of the given set of keywords.
    • stop

      public void stop() throws PorcupineException
      Stops recording audio from the microphone.
      Throws:
      PorcupineException - if the PorcupineManager.MicrophoneReader throws an exception while it's being stopped.