Picovoice Wordmark
Start Building
Introduction
Introduction
AndroidC.NETiOSLinuxmacOSNode.jsPythonRaspberry PiWebWindows
AndroidC.NETiOSNode.jsPythonWeb
SummaryPicovoice picoLLMGPTQ
Introduction
AndroidC.NETFlutteriOSJavaLinuxmacOSNode.jsPythonRaspberry PiReactReact NativeRustWebWindows
AndroidC.NETFlutteriOSJavaNode.jsPythonReactReact NativeRustWeb
SummaryPicovoice LeopardAmazon TranscribeAzure Speech-to-TextGoogle ASRGoogle ASR (Enhanced)IBM Watson Speech-to-TextWhisper Speech-to-Text
FAQ
Introduction
AndroidC.NETFlutteriOSJavaLinuxmacOSNode.jsPythonRaspberry PiReactReact NativeRustWebWindows
AndroidC.NETFlutteriOSJavaNode.jsPythonReactReact NativeRustWeb
SummaryPicovoice Cheetah
FAQ
Introduction
AndroidC.NETiOSLinuxmacOSNode.jsPythonRaspberry PiWebWindows
AndroidC.NETiOSNode.jsPythonWeb
SummaryAmazon PollyAzure TTSElevenLabsOpenAI TTSPicovoice Orca
Introduction
AndroidCiOSLinuxmacOSPythonRaspberry PiWebWindows
AndroidCiOSPythonWeb
SummaryPicovoice KoalaMozilla RNNoise
Introduction
AndroidCiOSLinuxmacOSNode.jsPythonRaspberry PiWebWindows
AndroidCNode.jsPythoniOSWeb
SummaryPicovoice EaglepyannoteSpeechBrainWeSpeaker
Introduction
AndroidCiOSLinuxmacOSPythonRaspberry PiWebWindows
AndroidCiOSPythonWeb
SummaryPicovoice FalconAmazon TranscribeAzure Speech-to-TextGoogle Speech-to-Textpyannote
Introduction
AndroidArduinoCChrome.NETEdgeFirefoxFlutteriOSJavaLinuxmacOSMicrocontrollerNode.jsPythonRaspberry PiReactReact NativeRustSafariUnityWebWindows
AndroidC.NETFlutteriOSJavaMicrocontrollerNode.jsPythonReactReact NativeRustUnityWeb
SummaryPorcupineSnowboyPocketSphinx
Wake Word TipsFAQ
Introduction
AndroidCChrome.NETEdgeFirefoxFlutteriOSJavaLinuxmacOSNode.jsPythonRaspberry PiReactReact NativeRustSafariUnityWebWindows
AndroidC.NETFlutteriOSJavaNode.jsPythonReactReact NativeRustUnityWeb
SummaryPicovoice RhinoGoogle DialogflowAmazon LexIBM WatsonMicrosoft LUIS
Expression SyntaxFAQ
Introduction
AndroidC.NETiOSLinuxmacOSNode.jsPythonRaspberry PiRustWebWindows
AndroidC.NETiOSNode.jsPythonRustWeb
SummaryPicovoice CobraWebRTC VAD
FAQ
Introduction
AndroidC.NETFlutteriOSNode.jsPythonReact NativeRustUnityWeb
AndroidC.NETFlutteriOSNode.jsPythonReact NativeRustUnityWeb
Introduction
C.NETNode.jsPython
C.NETNode.jsPython
FAQGlossary

Koala Noise Suppression
Android API

API Reference for the Android Koala SDK (koala-android)

package: ai.picovoice.koala


Koala

public class Koala { }

Class for the Koala Noise Suppression engine.

Koala must be initialized using the Builder() Class. Resources should be cleaned when you are done using the delete() function.


Koala.delete()

public void delete()

Releases resources acquired by Koala.


Koala.getFrameLength()

public int getFrameLength()

Getter for number of audio samples per frame.

Returns

  • int: Number of audio samples per frame.

Koala.getSampleRate()

public int getSampleRate()

Getter for required audio sample rate for PCM data.

Returns

  • int: Required audio sample rate for PCM data.

Koala.getVersion()

public String getVersion()

Getter for version.

Returns

  • String: Current Koala version.

Koala.getDelaySample()

public int getDelaySample()

Getter for the engine delay in samples. If the input and output of consecutive calls to process() are viewed as two contiguous streams of audio data, this delay specifies the time shift between the input and output stream.

Returns

  • int: Delay in number of samples.

Koala.process()

public short[] process(short[] pcm) throws KoalaException

Processes a frame of audio and returns delayed enhanced audio.

The number of samples per frame can be attained from 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.

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 attained from getDelaySample().

Parameters

  • pcm short[] : A frame of audio samples.

Returns

  • short[]: A frame of enhanced audio samples, stored as a sequence of 16-bit linearly-encoded integers.

Throws

  • KoalaException: If there is an error while processing the audio frame.

Koala.reset()

public void reset() throws KoalaException

Marks the end of the audio stream and resets the internal state of the object. Call this function in between calls to process() that do not provide consecutive frames of audio.

Throws

  • KoalaException: If there is an error while resetting the engine.

Koala.Builder

public static class Builder { }

Builder for creating an instance of Koala with a mixture of default arguments.


Koala.Builder.build()

public Koala build(Context context) throws KoalaException

Creates an instance of Koala Noise Suppression engine.

Parameters

  • context Context : The Android app context.

Returns

  • Koala: An instance of Koala Noise Suppression engine.

Throws

  • KoalaException: If an error occurs while creating an instance of Koala Noise Suppression engine.

Koala.Builder.setAccessKey()

public Koala.Builder setAccessKey(String accessKey)

Sets the AccessKey of the builder.

Parameters

  • accessKey String : AccessKey obtained from Picovoice Console.

Returns

  • Koala.Builder: Modified Koala.Builder object.

Koala.Builder.setModelPath()

public Koala.Builder setModelPath(String modelPath)

Sets the model path of the builder.

Parameters

  • modelPath String : Path to the file containing model parameters (.pv). Can be either a path that is relative to the project's assets folder or an absolute path to the file on device.

    Returns

  • Koala.Builder: Modified Koala.Builder object.


KoalaException

public class KoalaException extends Exception { }

Exception thrown if an error occurs within Koala Noise Suppression engine.

Exceptions:

public class KoalaActivationException extends KoalaException { }
public class KoalaActivationLimitException extends KoalaException { }
public class KoalaActivationRefusedException extends KoalaException { }
public class KoalaActivationThrottledException extends KoalaException { }
public class KoalaIOException extends KoalaException { }
public class KoalaInvalidArgumentException extends KoalaException { }
public class KoalaInvalidStateException extends KoalaException { }
public class KoalaKeyException extends KoalaException { }
public class KoalaMemoryException extends KoalaException { }
public class KoalaRuntimeException extends KoalaException { }
public class KoalaStopIterationException extends KoalaException { }

Was this doc helpful?

Issue with this doc?

Report a GitHub Issue
Koala Noise Suppression Android API
  • Koala
  • delete()
  • getFrameLength()
  • getSampleRate()
  • getVersion()
  • getDelaySample()
  • process()
  • reset()
  • Koala.Builder
  • build()
  • setAccessKey()
  • setModelPath()
  • KoalaException
Voice AI
  • Leopard Speech-to-Text
  • Cheetah Streaming Speech-to-Text
  • Orca Text-to-Speech
  • Koala Noise Suppression
  • Eagle Speaker Recognition
  • Falcon Speaker Diarization
  • Porcupine Wake Word
  • Rhino Speech-to-Intent
  • Cobra Voice Activity Detection
Local LLM
  • picoLLM Inference
  • picoLLM Compression
  • picoLLM GYM
Resources
  • Docs
  • Console
  • Blog
  • Use Cases
  • Playground
Sales & Services
  • Consulting
  • Foundation Plan
  • Enterprise Plan
  • Enterprise Support
Company
  • About us
  • Careers
Follow Picovoice
  • LinkedIn
  • GitHub
  • X
  • YouTube
  • AngelList
Subscribe to our newsletter
Terms of Use
Privacy Policy
© 2019-2025 Picovoice Inc.