Class Falcon


  • public class Falcon
    extends java.lang.Object
    Android binding for Falcon Speaker Diarization engine.
    • Nested Class Summary

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

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void delete()
      Releases resources acquired by Falcon.
      int getSampleRate()
      Getter for required audio sample rate for PCM data.
      java.lang.String getVersion()
      Getter for Falcon version.
      FalconSegment[] process​(short[] pcm)
      Processes given audio data and returns diarized speaker segments.
      FalconSegment[] processFile​(java.lang.String path)
      Processes given audio data and returns diarized speaker segments.
      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 Falcon.
      • process

        public FalconSegment[] process​(short[] pcm)
                                throws FalconException
        Processes given audio data and returns diarized speaker segments.
        Parameters:
        pcm - A frame of audio samples. The incoming audio needs to have a sample rate equal to getSampleRate() and be 16-bit linearly-encoded. Furthermore, Falcon operates on single channel audio. If you wish to process data in a different sample rate or format, consider using processFile(String).
        Returns:
        FalconSegment[] object which contains the diarization results of the engine.
        Throws:
        FalconException - if there is an error while processing the audio frame.
      • processFile

        public FalconSegment[] processFile​(java.lang.String path)
                                    throws FalconException
        Processes given audio data and returns diarized speaker segments.
        Parameters:
        path - Absolute path to the audio file. The supported formats are: `3gp (AMR)`, `FLAC`, `MP3`, `MP4/m4a (AAC)`, `Ogg`, `WAV` and `WebM`.
        Returns:
        FalconSegment[] object which contains the diarization results of the engine.
        Throws:
        FalconException - if there is an error while processing the audio frame.
      • getSampleRate

        public int getSampleRate()
        Getter for required audio sample rate for PCM data.
        Returns:
        Required audio sample rate for PCM data.
      • getVersion

        public java.lang.String getVersion()
        Getter for Falcon version.
        Returns:
        Falcon version.