
On-device speech-to-text and text-to-speech with built-in Whisper/Kitten models, native inference, optional model-packaging plugin, custom models configurable, no UI dependency or runtime downloads.
Run speech-to-text and text-to-speech on device in Android, iOS and JVM apps. Siren handles compatible Whisper/Kitten model configuration, native inference and cleanup. The quick-start build setup supplies default models; your app owns audio input/output. Custom models remain configurable.
The core SDK has no UI, Compose dependency or runtime downloads. The quick-start plugin packages default models during the app build.
Get started · Configuration · Samples · Verification
Actual Android sample. Capture provenance and limits.
Siren SDK 0.1.0 and the quick-start model add-on 0.1.0 are available on Maven Central. The plugin adds the SDK dependency and packages both models by default; you can opt out below.
In settings.gradle.kts, configure plugin and dependency repositories:
pluginManagement {
repositories { google(); mavenCentral(); gradlePluginPortal() }
}
dependencyResolutionManagement {
repositories { google(); mavenCentral() }
}Add this to the shared module's existing plugins:
plugins {
id("io.github.debanshu777.siren.models") version "0.1.0"
}This supplies the SDK dependency and both default model bundles. Ensure mavenCentral() is in your dependency repositories. Normal app builds fetch, verify and package Whisper tiny INT8 and Kitten nano INT8 automatically. No file placement, model-loading calls or extra initialization are needed. The installed app can use the models offline from first launch. Both bundles add about 138 MB before app compression. Android uses the KMP Android library plugin; standard iOS Xcode direct integration copies app resources automatically. See the integration details for custom iOS builds.
From a coroutine in androidMain, pass your app's mono recording and its actual sample rate:
import io.github.debanshu.siren.speech.createSpeechEngine
import io.github.debanshu.siren.speech.transcribe
import io.github.debanshu.siren.speech.use
val replyAudio = createSpeechEngine(context).use { engine ->
val text = engine.transcribe(recording.samples, recording.sampleRate)
engine.synthesize(text)
}On iOS or desktop, use createSpeechEngine() instead. For text-to-speech alone, call engine.synthesize("Hello from Siren.") inside the scope. use closes automatically; play the independent returned samples at replyAudio.sampleRate through your app's audio adapter.
To keep the SDK setup and remove default-model packaging:
sirenModels { bundleModels.set(false) }Supply your own bundle or local model configuration. You can also omit the plugin and add the core dependency directly. Independent recognition/synthesis selection, SDK version overrides and iOS build integration are covered in the quick-start guide. Clean previous app build products once when changing packaging choices.
| Target | Runtime packaging | Observed verification |
|---|---|---|
| Android API 27+ | arm64-v8a, x86_64 JNI | Pixel 9 native/physical audio/UI checks; x86_64 packaged, not device-tested |
| iOS | arm64 device/simulator static archives in KLIBs | Both dynamic consumer links; simulator app/native check. Physical iPhone audio unverified |
| JVM macOS arm64 | Native resources in JVM JAR | Native/relocated inference; packaged sample built and visually checked |
| JVM Linux x64 | Native resources in JVM JAR | Native model roundtrip passed in CI |
| JVM macOS x64, Linux arm64, Windows arm64/x64 | Native resources in JVM JAR | Packaged/hash-verified; execution untested |
The reference build uses Kotlin 2.4.21. The SDK targets Java 17 bytecode; the Gradle model plugin requires running Gradle on JDK 21 or later. Contributors use JDK 21. The pinned Compose sample uses iOS 18.5+. Wasm is unsupported. Evidence and limits.
The separate sample/ adds a shared Compose screen, controller, microphone/playback adapters and model preparation:
./gradlew :sample:androidApp:assembleDebug
open sample/iosApp/iosApp.xcodeproj
./gradlew :sample:desktopApp:runSee Android, iOS and desktop setup. Desktop packaging needs a full JDK accepted by Compose/jpackage. SDK runtime preparation contains no weights; default sample builds prepare both bundles. Disabling a capability at runtime does not trim already packaged files.
use handles cleanup. Long-lived engines have one lifecycle owner and must be closed when that owner finishes.Getting started · Model configuration · SDK · Architecture · Integration tutorial · Development · Release verification
Published the model add-on 0.1.0 with SDK/default-model setup and a whole-bundle opt-out. The release checks verified signed Central delivery, public plugin-ID resolution, native inference, Android/JVM packaging, both iOS links and Xcode resource copying. Core SDK 0.1.0 remains unchanged.
First-party source is MIT. Native components and model assets retain their own licenses; preserve third-party notices and audit status.
Run speech-to-text and text-to-speech on device in Android, iOS and JVM apps. Siren handles compatible Whisper/Kitten model configuration, native inference and cleanup. The quick-start build setup supplies default models; your app owns audio input/output. Custom models remain configurable.
The core SDK has no UI, Compose dependency or runtime downloads. The quick-start plugin packages default models during the app build.
Get started · Configuration · Samples · Verification
Actual Android sample. Capture provenance and limits.
Siren SDK 0.1.0 and the quick-start model add-on 0.1.0 are available on Maven Central. The plugin adds the SDK dependency and packages both models by default; you can opt out below.
In settings.gradle.kts, configure plugin and dependency repositories:
pluginManagement {
repositories { google(); mavenCentral(); gradlePluginPortal() }
}
dependencyResolutionManagement {
repositories { google(); mavenCentral() }
}Add this to the shared module's existing plugins:
plugins {
id("io.github.debanshu777.siren.models") version "0.1.0"
}This supplies the SDK dependency and both default model bundles. Ensure mavenCentral() is in your dependency repositories. Normal app builds fetch, verify and package Whisper tiny INT8 and Kitten nano INT8 automatically. No file placement, model-loading calls or extra initialization are needed. The installed app can use the models offline from first launch. Both bundles add about 138 MB before app compression. Android uses the KMP Android library plugin; standard iOS Xcode direct integration copies app resources automatically. See the integration details for custom iOS builds.
From a coroutine in androidMain, pass your app's mono recording and its actual sample rate:
import io.github.debanshu.siren.speech.createSpeechEngine
import io.github.debanshu.siren.speech.transcribe
import io.github.debanshu.siren.speech.use
val replyAudio = createSpeechEngine(context).use { engine ->
val text = engine.transcribe(recording.samples, recording.sampleRate)
engine.synthesize(text)
}On iOS or desktop, use createSpeechEngine() instead. For text-to-speech alone, call engine.synthesize("Hello from Siren.") inside the scope. use closes automatically; play the independent returned samples at replyAudio.sampleRate through your app's audio adapter.
To keep the SDK setup and remove default-model packaging:
sirenModels { bundleModels.set(false) }Supply your own bundle or local model configuration. You can also omit the plugin and add the core dependency directly. Independent recognition/synthesis selection, SDK version overrides and iOS build integration are covered in the quick-start guide. Clean previous app build products once when changing packaging choices.
| Target | Runtime packaging | Observed verification |
|---|---|---|
| Android API 27+ | arm64-v8a, x86_64 JNI | Pixel 9 native/physical audio/UI checks; x86_64 packaged, not device-tested |
| iOS | arm64 device/simulator static archives in KLIBs | Both dynamic consumer links; simulator app/native check. Physical iPhone audio unverified |
| JVM macOS arm64 | Native resources in JVM JAR | Native/relocated inference; packaged sample built and visually checked |
| JVM Linux x64 | Native resources in JVM JAR | Native model roundtrip passed in CI |
| JVM macOS x64, Linux arm64, Windows arm64/x64 | Native resources in JVM JAR | Packaged/hash-verified; execution untested |
The reference build uses Kotlin 2.4.21. The SDK targets Java 17 bytecode; the Gradle model plugin requires running Gradle on JDK 21 or later. Contributors use JDK 21. The pinned Compose sample uses iOS 18.5+. Wasm is unsupported. Evidence and limits.
The separate sample/ adds a shared Compose screen, controller, microphone/playback adapters and model preparation:
./gradlew :sample:androidApp:assembleDebug
open sample/iosApp/iosApp.xcodeproj
./gradlew :sample:desktopApp:runSee Android, iOS and desktop setup. Desktop packaging needs a full JDK accepted by Compose/jpackage. SDK runtime preparation contains no weights; default sample builds prepare both bundles. Disabling a capability at runtime does not trim already packaged files.
use handles cleanup. Long-lived engines have one lifecycle owner and must be closed when that owner finishes.Getting started · Model configuration · SDK · Architecture · Integration tutorial · Development · Release verification
Published the model add-on 0.1.0 with SDK/default-model setup and a whole-bundle opt-out. The release checks verified signed Central delivery, public plugin-ID resolution, native inference, Android/JVM packaging, both iOS links and Xcode resource copying. Core SDK 0.1.0 remains unchanged.
First-party source is MIT. Native components and model assets retain their own licenses; preserve third-party notices and audit status.