
Client for ElevenLabs API enabling TTS (batch, HTTP-streamed, realtime/WebSocket), STT (Scribe batch and realtime), voice/model listing, session control, and rotating API-key providers.
A Kotlin-first Multiplatform SDK for the ElevenLabs API, with coroutine and Flow-based APIs for Android, iOS and JVM.
Community-maintained SDK. Not affiliated with or endorsed by ElevenLabs.
ElevenLabs KMP is available from Maven Central.
// settings.gradle.kts
dependencyResolutionManagement {
repositories {
mavenCentral()
}
}// Shared module's build.gradle.kts
kotlin {
sourceSets {
commonMain.dependencies {
implementation("io.github.yveskalume:elevenlabs-kmp:0.2.0")
}
}
}Development snapshots are also published to the Central Portal snapshots repository:
// settings.gradle.kts
dependencyResolutionManagement {
repositories {
maven {
url = uri("https://central.sonatype.com/repository/maven-snapshots/")
content {
includeModule("io.github.yveskalume", "elevenlabs-kmp")
}
}
mavenCentral()
}
}Then use 0.2.1-SNAPSHOT as the version.
val elevenLabs = ElevenLabs {
apiKey(System.getenv("ELEVENLABS_API_KEY"))
}
val audio = elevenLabs.textToSpeech.generate(
TextToSpeechRequest(
voiceId = "JBFqnCBsd6RMkjVDRZzb",
text = "Hello from Kotlin Multiplatform.",
),
)
// audio.bytes is MP3 by default.Don't put an API key in an Android or iOS app. Have your backend issue single-use tokens instead, as described in the authentication guide.
kind and isRetryable on every failureThe guides are at yveskalume.github.io/elevenlabs-kmp:
The Android and iOS sample apps share one Compose Multiplatform UI, in sharedUI, with screens for
text to speech and live transcription. The samples build your development key into the app, so never
ship a build made this way.
For Android, add the following to the ignored local.properties file:
ELEVENLABS_API_KEY=your-development-keyFor iOS, create the ignored secrets configuration and replace its placeholder value:
cp iosApp/Configuration/Secrets.xcconfig.example \
iosApp/Configuration/Secrets.xcconfigA Kotlin-first Multiplatform SDK for the ElevenLabs API, with coroutine and Flow-based APIs for Android, iOS and JVM.
Community-maintained SDK. Not affiliated with or endorsed by ElevenLabs.
ElevenLabs KMP is available from Maven Central.
// settings.gradle.kts
dependencyResolutionManagement {
repositories {
mavenCentral()
}
}// Shared module's build.gradle.kts
kotlin {
sourceSets {
commonMain.dependencies {
implementation("io.github.yveskalume:elevenlabs-kmp:0.2.0")
}
}
}Development snapshots are also published to the Central Portal snapshots repository:
// settings.gradle.kts
dependencyResolutionManagement {
repositories {
maven {
url = uri("https://central.sonatype.com/repository/maven-snapshots/")
content {
includeModule("io.github.yveskalume", "elevenlabs-kmp")
}
}
mavenCentral()
}
}Then use 0.2.1-SNAPSHOT as the version.
val elevenLabs = ElevenLabs {
apiKey(System.getenv("ELEVENLABS_API_KEY"))
}
val audio = elevenLabs.textToSpeech.generate(
TextToSpeechRequest(
voiceId = "JBFqnCBsd6RMkjVDRZzb",
text = "Hello from Kotlin Multiplatform.",
),
)
// audio.bytes is MP3 by default.Don't put an API key in an Android or iOS app. Have your backend issue single-use tokens instead, as described in the authentication guide.
kind and isRetryable on every failureThe guides are at yveskalume.github.io/elevenlabs-kmp:
The Android and iOS sample apps share one Compose Multiplatform UI, in sharedUI, with screens for
text to speech and live transcription. The samples build your development key into the app, so never
ship a build made this way.
For Android, add the following to the ignored local.properties file:
ELEVENLABS_API_KEY=your-development-keyFor iOS, create the ignored secrets configuration and replace its placeholder value:
cp iosApp/Configuration/Secrets.xcconfig.example \
iosApp/Configuration/Secrets.xcconfig