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
Web API

API Reference for the Koala Web SDK (npm).


Koala

class Koala {}

Class for the Koala Noise Suppression engine.


Koala.create()

static async function create(
accessKey: string,
processCallback: (enhancedPcm: Int16Array) => void,
model: KoalaModel,
options: KoalaOptions = {}
): Promise<Koala>

Creates an instance of the Koala Noise Suppression engine.

Parameters

  • accessKey string : AccessKey obtained from Picovoice Console.
  • processCallback (enhancedPcm: Int16Array) => void : User-defined callback invoked when a frame of audio is processed.
  • model KoalaModel : Koala model options.
  • options KoalaOptions : Optional configuration arguments.

Returns

  • Koala : An instance of the Koala engine.

Koala.process()

async function process(pcm: Int16Array): Promise<void>

Processes a frame of audio. The required sample rate can be retrieved from sampleRate and the length of frame (number of audio samples per frame) can be retrieved from frameLength. The audio must be single-channel and 16-bit linearly-encoded.

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 delaySample.

Parameters

  • pcm Int16Array : A frame of audio samples.

Koala.reset()

async function reset(): Promise<void>

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.


Koala.release()

async function release(): Promise<void>

Releases resources acquired by the Koala Web SDK.


Koala.frameLength

get framelength(): number

Number of audio samples per frame.


Koala.sampleRate

get sampleRate(): number

Audio sample rate accepted by Koala.


Koala.version

get version(): string

Koala version string.


Koala.delaySample

get delaySample(): number

Koala delay in samples.


KoalaModel

type KoalaModel = {
base64?: string;
publicPath?: string;
customWritePath?: string;
forceWrite?: boolean;
version?: number;
}

Koala model type.

  • base64 string: The model file (.pv) in base64 string to initialize Koala.
  • publicPath string: The model file (.pv) path relative to the public directory.
  • customWritePath string : Custom path to save the model in storage. Set to a different name to use multiple models across koala instances.
  • forceWrite boolean : Flag to overwrite the model in storage even if it exists.
  • version number : Version of the model file. Increment to update the model file in storage.

KoalaOptions

type KoalaOptions = {
processErrorCallback?: (error: string) => void
}

Koala options type.

  • processErrorCallback boolean : User-defined callback invoked if any error happens while processing the audio stream. Its only input argument is the error message.

KoalaWorker

class KoalaWorker {}

A class for running the Koala Noise Suppression engine as a web worker thread.


KoalaWorker.create()

static async function create(
accessKey: string,
processCallback: (enhancedPcm: Int16Array) => void,
model: KoalaModel,
options: KoalaOptions = {}
): Promise<KoalaWorker>

Creates an instance of KoalaWorker.

Parameters

  • accessKey string : AccessKey obtained from Picovoice Console.
  • processCallback (enhancedPcm: Int16Array) => void : User-defined callback invoked when a frame of audio is processed.
  • model KoalaModel : Koala model options.
  • options KoalaOptions : Optional configuration arguments.

Returns

  • KoalaWorker : An instance of KoalaWorker.

KoalaWorker.process()

async function process(pcm: Int16Array): void

Processes a frame of audio. The required sample rate can be retrieved from 'sampleRate' and the length of frame (number of audio samples per frame) can be retrieved from 'frameLength'. The audio must be single-channel and 16-bit linearly-encoded.

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 delaySample.

Parameters

  • pcm Int16Array : A frame of audio samples.

KoalaWorker.reset()

async function reset(): Promise<void>

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.


KoalaWorker.release()

async function release(): Promise<void>

Releases resources acquired by the Koala Web SDK.


KoalaWorker.terminate()

async function terminate(): Promise<void>

Force terminates the instance of KoalaWorker.


KoalaWorker.frameLength

get frameLength(): number

Number of audio samples per frame.


KoalaWorker.sampleRate

get sampleRate(): number

Audio sample rate accepted by Koala.


KoalaWorker.version

get version(): string

Koala version string.


Koala.delaySample

get delaySample(): number

Koala delay in samples.

Was this doc helpful?

Issue with this doc?

Report a GitHub Issue
Koala Noise Suppression Web API
  • Koala
  • create()
  • process()
  • reset()
  • release()
  • frameLength
  • sampleRate
  • version
  • delaySample
  • KoalaModel
  • KoalaOptions
  • KoalaWorker
  • create()
  • process()
  • reset()
  • release()
  • terminate()
  • frameLength
  • sampleRate
  • version
  • delaySample
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.