Picovoice WordmarkPicovoice Console
Introduction
Introduction
AndroidC.NETFlutterlink to GoiOSJavaNvidia JetsonLinuxmacOSNodejsPythonRaspberry PiReact NativeRustWebWindows
AndroidC.NETFlutterlink to GoiOSJavaNodejsPythonReact NativeRustWeb
SummaryPicovoice LeopardAmazon TranscribeAzure Speech-to-TextGoogle ASRGoogle ASR (Enhanced)IBM Watson Speech-to-Text
FAQ
Introduction
AndroidC.NETFlutterlink to GoiOSJavaNodejsPythonReact NativeRustWeb
AndroidC.NETFlutterlink to GoiOSJavaNodejsPythonReact NativeRustWeb
FAQ
Introduction
AndroidCiOSLinuxmacOSPythonWebWindows
AndroidCiOSPythonWeb
SummaryOctopus Speech-to-IndexGoogle Speech-to-TextMozilla DeepSpeech
FAQ
Introduction
AndroidAngularArduinoBeagleBoneCChrome.NETEdgeFirefoxFlutterlink to GoiOSJavaNvidia JetsonLinuxmacOSMicrocontrollerNodejsPythonRaspberry PiReactReact NativeRustSafariUnityVueWebWindows
AndroidAngularC.NETFlutterlink to GoiOSJavaMicrocontrollerNodejsPythonReactReact NativeRustUnityVueWeb
SummaryPorcupineSnowboyPocketSphinx
Wake Word TipsFAQ
Introduction
AndroidAngularBeagleBoneCChrome.NETEdgeFirefoxFlutterlink to GoiOSJavaNvidia JetsonlinuxmacOSNodejsPythonRaspberry PiReactReact NativeRustSafariUnityVueWebWindows
AndroidAngularC.NETFlutterlink to GoiOSJavaNodejsPythonReactReact NativeRustUnityVueWeb
SummaryPicovoice RhinoGoogle DialogflowAmazon LexIBM WatsonMicrosoft LUIS
Expression SyntaxFAQ
Introduction
AndroidBeagleboneCiOSNvidia JetsonLinuxmacOSPythonRaspberry PiRustWebWindows
AndroidCiOSPythonRustWeb
SummaryPicovoice CobraWebRTC VAD
FAQ
Introduction
AndroidCiOSPythonWeb
AndroidCiOSPythonWeb
SummaryPicovoice KoalaMozilla RNNoise
Introduction
AndroidAngularArduinoBeagleBoneC.NETFlutterlink to GoiOSJavaNvidia JetsonMicrocontrollerNodejsPythonRaspberry PiReactReact NativeRustUnityVueWeb
AndroidAngularCMicrocontroller.NETFlutterlink to GoiOSJavaNodejsPythonReactReact NativeRustUnityVueWeb
Picovoice SDK - FAQ
IntroductionSTM32F407G-DISC1 (Arm Cortex-M4)STM32F411E-DISCO (Arm Cortex-M4)STM32F769I-DISCO (Arm Cortex-M7)IMXRT1050-EVKB (Arm Cortex-M7)
FAQGlossary

Koala Noise Suppression
iOS API


API Reference for the Koala iOS SDK (Cocoapods ) .


Koala

public class Koala { }

Class for the Koala Noise Suppression engine.

Koala can be initialized using the class constructor. Resources should be cleaned when you are done using the delete() method.


Koala.delaySample

public var delaySample: UInt32

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.


Koala.frameLength

public static let frameLength: UInt32

The number of audio samples per frame that Koala accepts.


Koala.sampleRate

public static let sampleRate: UInt32

The audio sample rate that Koala accepts.


Koala.version

public static let version: String

The Koala library version string.


Koala.init()

public init(accessKey: String, modelPath: String? = nil) throws

init method for Koala Noise Suppression Engine.

Parameters

  • access_key String : AccessKey obtained from Picovoice Console .
  • modelPath String? : Absolute path to file containing model parameters (.pv).

Returns

  • Koala : An instance of Koala Noise Suppression Engine.

Throws

  • KoalaError
public convenience init(accessKey: String, modelURL: URL) throws

Parameters

  • access_key String : AccessKey obtained from Picovoice Console .
  • modelURL URL : URL to file containing model parameters (.pv).

Returns

  • Koala : An instance of Koala Noise Suppression Engine.

Throws

  • KoalaError

Koala.delete()

public func delete()

Releases resources acquired by Koala.


Koala.process()

public func process(pcm: [Int16]) throws -> [Int16]

Processes a frame of audio and returns delayed enhanced audio.

The number of samples per frame can be attained from frameLength. The incoming audio needs to have a sample rate equal to sampleRate 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 delaySample.

Parameters

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

Returns

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

Throws

  • KoalaError

Koala.reset()

public func reset() throws

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.


KoalaError

public class KoalaError : LocalizedError { }

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

Exceptions

public class KoalaMemoryError : KoalaError {}
public class KoalaIOError : KoalaError {}
public class KoalaInvalidArgumentError : KoalaError {}
public class KoalaStopIterationError : KoalaError {}
public class KoalaKeyError : KoalaError {}
public class KoalaInvalidStateError : KoalaError {}
public class KoalaRuntimeError : KoalaError {}
public class KoalaActivationError : KoalaError {}
public class KoalaActivationLimitError : KoalaError {}
public class KoalaActivationThrottledError : KoalaError {}
public class KoalaActivationRefusedError : KoalaError {}

Was this doc helpful?

Issue with this doc?

Report a GitHub Issue
Koala Noise Suppression iOS API
  • Koala
  • delaySample
  • frameLength
  • sampleRate
  • version
  • init()
  • delete()
  • process()
  • reset()
  • KoalaError
Platform
  • Leopard Speech-to-Text
  • Cheetah Streaming Speech-to-Text
  • Octopus Speech-to-Index
  • Porcupine Wake Word
  • Rhino Speech-to-Intent
  • Cobra Voice Activity Detection
Resources
  • Docs
  • Console
  • Blog
  • Demos
Sales
  • Pricing
  • Starter Tier
  • Enterprise
Company
  • Careers
Follow Picovoice
  • LinkedIn
  • GitHub
  • Twitter
  • Medium
  • YouTube
  • AngelList
Subscribe to our newsletter
Terms of Use
Privacy Policy
© 2019-2022 Picovoice Inc.