App Registration
To use server-based speech synthesis, register the app with the Client ID and Client Secret issued when creating My Project in Pleos Playground. After SDK initialization is complete, call registerApp().
info
App registration is required in SERVER mode. If you want to use server-based synthesis in HYBRID mode, you must register the app. Registration is not necessary if you are only using ON_DEVICE mode.
- Kotlin
- Java
textToSpeech.registerApp(
clientID = clientId,
clientSecret = clientSecret,
listener = object : OnServerConnectionListener {
override fun onConnected() {
// 서버 기반 음성 합성을 요청할 수 있습니다.
}
override fun onFailed(errorType: ErrorType) {
// 등록 또는 서버 연결 실패를 처리합니다.
}
}
)
textToSpeech.registerApp(
clientId,
clientSecret,
new OnServerConnectionListener() {
@Override
public void onConnected() {
// 서버 기반 음성 합성을 요청할 수 있습니다.
}
@Override
public void onFailed(ErrorType errorType) {
// 등록 또는 서버 연결 실패를 처리합니다.
}
}
);
Start server-based requests after onConnected() is called.