Class Koala


  • public class Koala
    extends java.lang.Object
    Android binding for Koala Noise Suppression engine.
    • Nested Class Summary

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

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void delete()
      Releases resources acquired by Koala.
      int getDelaySample()
      Getter for Koala delaySample.
      int getFrameLength()
      Getter for required number of audio samples per frame.
      int getSampleRate()
      Getter for required audio sample rate for PCM data.
      java.lang.String getVersion()
      Getter for Koala version.
      short[] process​(short[] pcm)
      Processes given audio data and returns delayed enhanced audio.
      void reset()
      Resets Koala into a state as if it had just been newly created.
      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 Koala.
      • process

        public short[] process​(short[] pcm)
                        throws KoalaException
        Processes given audio data and returns delayed enhanced audio.
        Parameters:
        pcm - A frame of audio samples. The number of samples per frame can be obtained by calling getFrameLength(). The incoming audio needs to have a sample rate equal to getSampleRate() and be 16-bit linearly-encoded. Koala operates on single-channel audio. Consecutive calls to #process() must provide consecutive frames of audio from the same source, unless reset() has been called in between.
        Returns:
        A frame of enhanced audio samples, stored as a sequence of 16-bit linearly-encoded integers. The output is not directly the enhanced version of the input PCM, but corresponds to samples that were given in previous calls to #process(). The delay in samples between the start time of the input frame and the start time of the output frame can be obtained from getDelaySample().
        Throws:
        KoalaException - if there is an error while processing the audio frame.
      • reset

        public void reset()
                   throws KoalaException
        Resets Koala into a state as if it had just been newly created. Call this function in between calls to #process() that do not provide consecutive frames of audio.
        Throws:
        KoalaException - if there is an error while processing the audio frame.
      • getFrameLength

        public int getFrameLength()
        Getter for required number of audio samples per frame.
        Returns:
        Required number of audio samples per 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 Koala version.
        Returns:
        Koala version.
      • getDelaySample

        public int getDelaySample()
                           throws KoalaException
        Getter for Koala delaySample.
        Returns:
        Koala process delay in number of samples.
        Throws:
        KoalaException