Kodio 0.1.1 Help

Getting Started

Kodio is a Kotlin Multiplatform library for audio recording and playback. It provides a simple, coroutine-based API that works identically across all supported platforms.

Kodio Architecture

Add the dependency

Add Kodio to your commonMain source set in your Gradle build file:

First, add to your libs.versions.toml:

[versions] kodio = "0.1.1" [libraries] kodio-core = { module = "space.kodio:core", version.ref = "kodio" }

Then in your build.gradle.kts:

kotlin { sourceSets { commonMain.dependencies { implementation(libs.kodio.core) } } }
kotlin { sourceSets { commonMain.dependencies { implementation("space.kodio:core:0.1.1") } } }

Record and play audio

With Kodio, you can record audio and play it back with just a few lines of code. The API is designed to be intuitive and follows Kotlin idioms like coroutines and extension functions.

// Record 5 seconds of audio val recording = Kodio.record(duration = 5.seconds) // Play it back recording.play() // Save to a file recording.saveAs(Path("audio.wav"))

The record function is a suspend function that captures audio for the specified duration and returns an AudioRecording object. You can then play it, save it, or process it further.

Supported platforms

Kodio supports all major Kotlin Multiplatform targets:

Platform

Status

Notes

🤖 Android

✅ Stable

Requires Kodio.initialize()

🍎 iOS

✅ Stable

Requires Info.plist entry

🍏 macOS

✅ Stable

Requires entitlements

☕ JVM

✅ Stable

No setup required

🌐 JS

✅ Stable

HTTPS required

🔮 Wasm

✅ Stable

HTTPS required

Available modules

Kodio is split into modules so you can include only what you need:

space.kodio:core

The foundation module providing recording, playback, and file I/O. This is the only required module.

space.kodio:compose

Compose Multiplatform state holders (rememberRecorderState, rememberPlayerState) and the AudioWaveform component.

space.kodio:compose-material3

Pre-built Material 3 UI components like RecordAudioButton, PlayAudioButton, and ErrorDialog.

space.kodio:transcription

Audio transcription using OpenAI Whisper API. Provides OpenAIWhisperEngine and the AudioFlow.transcribe() extension.

What's next

Jump to Quick Start for common recording and playback patterns.

See Installation for detailed dependency configuration and Platform Setup for platform-specific requirements.

If you're building with Compose, check out RecorderState for reactive recording UI.

Last modified: 19 January 2026