Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marc-jb/texttospeechkt
Kotlin Multiplatform Text-to-Speech library for Android and browser (Kotlin/JS & Kotlin/Wasm)
https://github.com/marc-jb/texttospeechkt
gradle gradle-kotlin-dsl kotlin
Last synced: 4 months ago
JSON representation
Kotlin Multiplatform Text-to-Speech library for Android and browser (Kotlin/JS & Kotlin/Wasm)
- Host: GitHub
- URL: https://github.com/marc-jb/texttospeechkt
- Owner: Marc-JB
- License: mit
- Created: 2020-07-14T08:15:30.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-05-21T20:20:48.000Z (9 months ago)
- Last Synced: 2024-05-22T16:12:15.508Z (8 months ago)
- Topics: gradle, gradle-kotlin-dsl, kotlin
- Language: Kotlin
- Homepage: https://marc-jb.github.io/TextToSpeechKt/
- Size: 2.9 MB
- Stars: 9
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TextToSpeechKt
Kotlin Multiplatform Text-to-Speech library for Android and browser (Kotlin/JS & Kotlin/Wasm).[![Gradle deployment](https://github.com/Marc-JB/TextToSpeechKt/actions/workflows/deployment.yml/badge.svg)](https://github.com/Marc-JB/TextToSpeechKt/actions)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=Marc-JB_TextToSpeechKt&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=Marc-JB_TextToSpeechKt)
[![Maven Central](https://badgen.net/maven/v/maven-central/nl.marc-apps/tts)](https://central.sonatype.com/search?smo=true&namespace=nl.marc-apps&q=tts)
[![License](https://badgen.net/github/license/Marc-JB/TextToSpeechKt)](https://github.com/Marc-JB/TextToSpeechKt/blob/main/LICENSE)# :notebook_with_decorative_cover: Table of Contents
- [About the Project](#star2-about-the-project)
* [Tech Stack](#space_invader-tech-stack)
* [Features](#dart-features)
- [Getting Started](#toolbox-getting-started)
* [Prerequisites](#bangbang-prerequisites)
* [Installation](#gear-installation)
- [Usage](#eyes-usage)
- [License](#warning-license)
- [Acknowledgements](#gem-acknowledgements)## :star2: About the Project
### :space_invader: Tech Stack
Uses Kotlin Multiplatform with support for the following targets:| Platform | Language | Support |
|---------------------|---------------|---------------------------|
| Android | Kotlin/JVM | ✅ |
| Browser | Kotlin/JS | ✅ |
| Browser | Kotlin/Wasm | ✅ |
| Browser | JS, TS | ❌ _Support ended in v2.0_ |
| Desktop | Kotlin/JVM | ⚠️ _Experimental support_ |
| iOS | Kotlin/Native | ❌ |
| 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:
```Kotlin copy
repositories {
mavenCentral()
}
```And add the library to your dependencies:
```Kotlin copy
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0")
implementation("nl.marc-apps:tts:2.5.0")// Optional: Extensions for Compose
implementation("nl.marc-apps:tts-compose:2.5.0")
}
```Or
```Kotlin copy
kotlin {
sourceSets {
commonMain.dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0")
implementation("nl.marc-apps:tts:2.5.0")// Optional: Extensions for Compose
implementation("nl.marc-apps:tts-compose:2.5.0")
}
}
}
```Make sure to configure the latest stable version: [![Maven Central](https://badgen.net/maven/v/maven-central/nl.marc-apps/tts)](https://central.sonatype.com/search?smo=true&namespace=nl.marc-apps&q=tts)
Apache Maven
Add the library to your dependencies:
```XML copy
org.jetbrains.kotlinx
kotlinx-coroutines-core
1.8.0
nl.marc-apps
tts
2.5.0
nl.marc-apps
tts-compose
2.5.0
```Make sure to configure the latest stable version: [![Maven Central](https://badgen.net/maven/v/maven-central/nl.marc-apps/tts)](https://central.sonatype.com/search?smo=true&namespace=nl.marc-apps&q=tts)
## :eyes: Usage
### Documentation files
[View documentation generated by Dokka](https://marc-jb.github.io/TextToSpeechKt/index.html)### Demo projects
Go to the [/demo directory](/demo) of this project.## :warning: License
This project is published under the MIT License. Read more about this license in the `LICENSE` file.## :gem: Acknowledgements
- [Awesome Readme Template](https://github.com/Louis3797/awesome-readme-template)
- [Badgen](https://badgen.net/)