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.init()
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
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
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