Shared audio preprocessing and streaming utilities for the SKaiNET.
| Module | What it is |
|---|---|
audio-core |
Neutral value types (FeatureFrames, FeatureExtractor), linear Resampler → 16 kHz mono. |
audio-wav |
Wav — the single RIFF/WAV codec (16-bit PCM decode any-channels→mono, mono encode), pure Kotlin over ByteArray. |
audio-mel |
MelSpectrogram(filterbank, MelConfig) — parameterized log-mel: MelConfig.whisper() (80 mel, verified vs whisper.log_mel_spectrogram golden), MelConfig.parakeet() (128 mel, natural length). Plus MelFilterbanks.slaney(...) generation. |
audio-source |
AudioSource Flow abstraction + WavAudioSource (jvm) + MicAudioSource (android, AudioRecord). |
audio-stream |
windows(...) — chunk-boundary-independent window buffering with terminal-window marking. |
audio-vad |
VoiceActivityDetector (+ default EnergyVad) and Endpointer — line-oriented speech events (LineOpened / Pcm / LineClosed) that drive a streaming cartridge's line semantics. |
./gradlew build # or :audio-mel:jvmTest etc.
Every module's KMP target declarations, Android setup, and npm/dependency pinning come from
SKaiNET-build-logic's
sk.ainet.multiplatform/sk.ainet.npm-pins convention plugins (as of 0.2.0) instead of being
hand-rolled per module — see that repo for what each plugin does, and a given module's own
gradle.properties (skainet.targets=...) for its exact target set.
All modules publish to Maven Central under the sk.ainet.audio group, artifact ID = module name:
dependencies {
implementation("sk.ainet.audio:audio-mel:0.2.1") // pulls audio-core transitively
implementation("sk.ainet.audio:audio-vad:0.2.1")
}Publishing mirrors the SKaiNET engine repo:
the vanniktech maven-publish plugin
with POM metadata and Maven Central flags in gradle.properties, and a tag-triggered
release workflow (.github/workflows/publish.yml).