App registration
To use server-based speech synthesis, register your app with the Client ID and Client Secret issued when you create My Project in Pleos Playground. Call registerApp() after SDK initialization completes.
info
App registration is required in SERVER mode. It is also required in HYBRID mode to use server-based synthesis. Registration is not required when your app uses only ON_DEVICE mode.
- Kotlin
- Java
textToSpeech.registerApp(
clientID = clientId,
clientSecret = clientSecret,
listener = object : OnServerConnectionListener {
override fun onConnected() {
// You can request server-based speech synthesis.
}
override fun onFailed(errorType: ErrorType) {
// Handle registration or server connection failure.
}
}
)
textToSpeech.registerApp(
clientId,
clientSecret,
new OnServerConnectionListener() {
@Override
public void onConnected() {
// You can request server-based speech synthesis.
}
@Override
public void onFailed(ErrorType errorType) {
// Handle registration or server connection failure.
}
}
);
Start server-based requests only after onConnected() is called.