:notebook_with_decorative_cover: Table of Contents
:star2: About the Project
:space_invader: Tech Stack
Uses Kotlin Multiplatform with support for the following targets:
Android | Kotlin/JVM | ✅ |
Browser | Kotlin/JS | ✅ |
Browser | Kotlin/Wasm | ✅ |
Browser | JS, TS | ❌ Support ended in v2.0 |
Desktop | Kotlin/JVM | ⚠️ Experimental support |
iOS, MacOS | Kotlin/Native | ⚠️ Experimental support |
Other Kotlin/Native | Kotlin/Native | ❌ |
:dart: Features
- Create the engine with Kotlin Coroutines
- Await speech synthesis completion using Kotlin Coroutines
- Modify the volume or mute the volume entirely
- Modify the voice pitch
- Modify the voice rate
- Compose support with
rememberTextToSpeechOrNull()
(works in multiplatform code!)
:toolbox: Getting Started
:bangbang: Prerequisites
A build tool like Gradle or Maven.
:gear: Installation
Gradle
Configure the Maven Central repository:
repositories {
mavenCentral()
}
And add the library to your dependencies:
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0")
implementation("nl.marc-apps:tts:2.5.0")
implementation("nl.marc-apps:tts-compose:2.5.0")
}
Or
kotlin {
sourceSets {
commonMain.dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0")
implementation("nl.marc-apps:tts:2.5.0")
implementation("nl.marc-apps:tts-compose:2.5.0")
}
}
}
Make sure to configure the latest stable version: 
Apache Maven
Add the library to your dependencies:
<dependency>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-coroutines-core</artifactId>
<version>1.8.0</version>
</dependency>
<dependency>
<groupId>nl.marc-apps</groupId>
<artifactId>tts</artifactId>
<version>2.5.0</version>
</dependency>
<dependency>
<groupId>nl.marc-apps</groupId>
<artifactId>tts-compose</artifactId>
<version>2.5.0</version>
</dependency>
Make sure to configure the latest stable version: 
:eyes: Usage
Documentation files
View documentation generated by Dokka
Demo projects
Go to the /demo directory of this project.
:warning: License
This project is published under the MIT License. Read more about this license in the LICENSE
file.
:gem: Acknowledgements