Koala Noise Suppression
iOS API
API Reference for the Koala iOS SDK (Cocoapods) .
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
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
The number of audio samples per frame that Koala accepts.
Koala.sampleRate
The audio sample rate that Koala accepts.
Koala.version
The Koala library version string.
Koala.getAvailableDevices()
Retrieves a list of devices that can be specified when constructing Koala.
Returns
- [String] : An array of available devices.
Throws
KoalaError: If an error occurs while retrieving the devices.
Koala.init()
init method for Koala Noise Suppression Engine.
Parameters
access_keyString : AccessKey obtained from Picovoice Console.modelPathString? : Absolute path to file containing model parameters (.pv).deviceString? : String representation of the device (e.g., CPU or GPU) to use. If set tobest, the most suitable device is selected automatically. If set togpu, the engine uses the first available GPU device. To select a specific GPU device, set this argument togpu:${GPU_INDEX}, where${GPU_INDEX}is the index of the target GPU. If set tocpu, the engine will run on the CPU with the default number of threads. To specify the number of threads, set this argument tocpu:${NUM_THREADS}, where${NUM_THREADS}is the desired number of threads.
Returns
Koala: An instance of Koala Noise Suppression Engine.
Throws
Parameters
access_keyString : AccessKey obtained from Picovoice Console.modelURLURL : URL to file containing model parameters (.pv).
Returns
Koala: An instance of Koala Noise Suppression Engine.
Throws
Koala.delete()
Releases resources acquired by Koala.
Koala.process()
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
Koala.reset()
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
Error thrown if an error occurs within Koala Noise Suppression engine.
Exceptions