//clika-runtime/io.clika.runtime/AudioProcessor
AudioProcessor
[common]
class AudioProcessor
A configuration-driven audio feature processor: a waveform in, the raw waveform, a log-mel spectrogram or a log-mel filterbank out, as a model's preprocessor_config.json states it. A file or payload is decoded, resampled to the configured rate and mixed to mono first; a waveform you hand in must already be at that rate. AutoCloseable: close releases it.
Types
| Name | Summary |
|---|---|
| Companion | [common] object Companion |
Functions
| Name | Summary |
|---|---|
| close | [common] open fun close() |
| process | [common] fun process(bytes: ByteArray, options: AudioProcessOptions? = null, where: Placement? = null): Tensor Decode an encoded audio payload and compute its features. [common] fun process(path: String, options: AudioProcessOptions? = null, where: Placement? = null): Tensor Decode an audio file and compute its features. [common] fun process(waveform: Tensor, sampleRate: Int, options: AudioProcessOptions? = null, where: Placement? = null): Tensor Features of a decoded mono waveform tensor ( [N] or [1, N] Float32) at sampleRate.[common] fun process(waveform: FloatArray, sampleRate: Int, options: AudioProcessOptions? = null, where: Placement? = null): Tensor Features of a decoded mono waveform at sampleRate, which must equal the configured rate. |