public final class TTSEvent extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
TTSEvent.Type
Enum representing the type of event being dispatched.
|
| Modifier and Type | Field and Description |
|---|---|
TTSEvent.Type |
type
The event type.
|
| Constructor and Description |
|---|
TTSEvent(TTSEvent.Type eventType)
Create an event with the specified type containing no other data.
|
| Modifier and Type | Method and Description |
|---|---|
Throwable |
getError()
Get the error represented by this event.
|
AudioResponse |
getTtsResponse()
Get the response data containing synthesized audio.
|
void |
setError(Throwable error)
Set the error represented by this event.
|
void |
setTtsResponse(AudioResponse response)
Attach response data containing the location of synthesized audio.
|
public final TTSEvent.Type type
public TTSEvent(TTSEvent.Type eventType)
eventType - The event type.public AudioResponse getTtsResponse()
public void setTtsResponse(AudioResponse response)
response - A response from a TTS service.public Throwable getError()
public void setError(Throwable error)
error - An error that occurred in the TTS subsystem.Copyright © 2021. All rights reserved.