Project setup
To use the TextToSpeech SDK, configure the SDK dependencies and permissions.
Add the SDK dependency
Add the dependency to the build.gradle
file as shown in the example below.
settings.gradle
file
- Kotlin
- Groovy
dependencyResolutionManagement {
...
repositories {
...
maven("https://nexus-playground.pleos.ai/repository/maven-releases/")
}
}
dependencyResolutionManagement {
...
repositories {
...
maven {
url "https://nexus-playground.pleos.ai/repository/maven-releases/"
}
}
}
App module's build.gradle
file
- Kotlin
- Groovy
dependencies {
implementation("ai.pleos.playground:TextToSppech:2.1.3.1")
}
dependencies {
implementation "ai.pleos.playground:TextToSppech:2.1.3.1"
}
Add permission requirement
All APIs in this SDK require the following permission to be granted. Ensure this permission is added to your AndroidManifest.xml file.
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
...
<uses-permission android:name="pleos.car.permission.TTS_SERVICE" />
...
</manifest>