Class Eagle


  • public class Eagle
    extends java.lang.Object
    Android binding for Eagle speaker recognition engine.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Eagle.Builder
      Builder for creating instance of Eagle.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void delete()
      Releases resources acquired by Eagle.
      int getFrameLength()
      Getter for number of audio samples per frame.
      int getSampleRate()
      Getter for audio sample rate accepted by Picovoice.
      java.lang.String getVersion()
      Getter for version.
      float[] process​(short[] pcm)
      Processes a frame of audio and returns a list of similarity scores for each speaker profile.
      void reset()
      Resets the internal state of Eagle Profiler.
      static void setSdk​(java.lang.String sdk)  
      • Methods inherited from class java.lang.Object

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

      • setSdk

        public static void setSdk​(java.lang.String sdk)
      • delete

        public void delete()
        Releases resources acquired by Eagle.
      • process

        public float[] process​(short[] pcm)
                        throws EagleException
        Processes a frame of audio and returns a list of similarity scores for each speaker profile.
        Parameters:
        pcm - A frame of audio samples. The number of samples per frame can be attained by calling `.getFrameLength()`. The incoming audio needs to have a sample rate equal to `.getSampleRate()` and be 16-bit linearly-encoded. Eagle operates on single-channel audio.
        Returns:
        A list of similarity scores for each speaker profile. A higher score indicates that the voice belongs to the corresponding speaker. The range is [0, 1] with 1.0 representing a perfect match.
        Throws:
        EagleException - if there is an error while processing audio frames.
      • reset

        public void reset()
                   throws EagleException
        Resets the internal state of Eagle Profiler. It should be called before starting a new enrollment session.
        Throws:
        EagleException - if there is an error while resetting Eagle.
      • getVersion

        public java.lang.String getVersion()
        Getter for version.
        Returns:
        Version.
      • getFrameLength

        public int getFrameLength()
        Getter for number of audio samples per frame.
        Returns:
        Number of audio samples per frame.
      • getSampleRate

        public int getSampleRate()
        Getter for audio sample rate accepted by Picovoice.
        Returns:
        Audio sample rate accepted by Picovoice.