public class TtsPlayer
extends java.lang.Object
| Constructor and Description |
|---|
TtsPlayer(android.content.Context context,
ITtsPlayerListener listener)
TTS Player
|
| Modifier and Type | Method and Description |
|---|---|
int |
destroy()
Destroy TTS player
|
boolean |
isPlaying()
Check to see if TTS is playing.
|
void |
playText(java.lang.String text,
boolean getCallback)
Play TTS sound by the specified text input.
|
void |
setSpeed(float speed)
Set TTS playback speed.
|
void |
setVolume(int volume)
Set TTS output volume.
|
void |
stop(boolean getCallback)
Force to stop TTS playback
|
public TtsPlayer(android.content.Context context,
ITtsPlayerListener listener)
context - - The activity context object.listener - - The specified callback listener.public boolean isPlaying()
public void playText(java.lang.String text,
boolean getCallback)
text - - The text you want to play.getCallback - - Enable to get status callback or not.public void stop(boolean getCallback)
getCallback - - Enable to get status callback or not.public int destroy()
public void setVolume(int volume)
volume - - The volume value from 1 to 100, default is 100.public void setSpeed(float speed)
speed - - Default is 1.0