public static class SpokestackCloudClient.Builder extends Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
SpokestackCloudClient |
build()
initializes a new speech client instance.
|
okhttp3.OkHttpClient |
getHttpClient()
get a new HTTP client.
|
SpokestackCloudClient.Builder |
setCredentials(String clientId,
String secret)
sets the Spokestack credentials used for authentication.
|
SpokestackCloudClient.Builder |
setLang(String value)
sets the language code.
|
SpokestackCloudClient.Builder |
setListener(SpokestackCloudClient.Listener value)
attaches the listener callback.
|
SpokestackCloudClient.Builder |
setSampleRate(int value)
sets the audio sample rate.
|
public SpokestackCloudClient.Builder setCredentials(String clientId, String secret)
clientId
- client IDsecret
- secret keypublic SpokestackCloudClient.Builder setLang(String value)
value
- language codepublic SpokestackCloudClient.Builder setSampleRate(int value)
value
- sample rate, in Hzpublic SpokestackCloudClient.Builder setListener(SpokestackCloudClient.Listener value)
value
- event listener to configurepublic SpokestackCloudClient build()
IllegalArgumentException
- if the configuration is invalidpublic okhttp3.OkHttpClient getHttpClient()
Copyright © 2021. All rights reserved.