public static final class TTSManager.Builder extends Object
Constructor and Description |
---|
Builder()
Initializes a new builder with no default configuration.
|
Modifier and Type | Method and Description |
---|---|
TTSManager.Builder |
addTTSListener(TTSListener listener)
Adds a TTS listener.
|
TTSManager |
build()
Creates and initializes the TTS manager subsystem.
|
TTSManager.Builder |
setAndroidContext(android.content.Context androidContext)
Sets the Android context for the pipeline.
|
TTSManager.Builder |
setConfig(SpeechConfig value)
Attaches a configuration object.
|
TTSManager.Builder |
setLifecycle(androidx.lifecycle.Lifecycle curLifecycle)
Sets the manager's current lifecycle.
|
TTSManager.Builder |
setOutputClass(String value)
Sets the class name of the audio output component.
|
TTSManager.Builder |
setProperty(String key,
Object value)
Sets a component configuration value.
|
TTSManager.Builder |
setTTSServiceClass(String value)
Sets the class name of the external TTS service component.
|
public Builder()
TTSManager
public TTSManager.Builder setTTSServiceClass(String value)
value
- TTS service component class namepublic TTSManager.Builder setOutputClass(String value)
value
- Audio output component class namepublic TTSManager.Builder setConfig(SpeechConfig value)
value
- configuration to attachpublic TTSManager.Builder setProperty(String key, Object value)
key
- configuration property namevalue
- property valuepublic TTSManager.Builder setAndroidContext(android.content.Context androidContext)
androidContext
- The Android context for the pipeline.SpokestackTTSOutput
public TTSManager.Builder setLifecycle(androidx.lifecycle.Lifecycle curLifecycle)
curLifecycle
- The lifecycle dispatching events to this TTS
manager.public TTSManager.Builder addTTSListener(TTSListener listener)
listener
- listener implementationpublic TTSManager build() throws Exception
Exception
- if there is an error during construction.Copyright © 2020. All rights reserved.