public class TtsParams extends Object
| 构造器 | 说明 |
|---|---|
TtsParams() |
Constructor of the
InitParams class |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
String |
getDeviceId() |
Obtains the device ID.
|
int |
getDeviceType() |
Obtains the device type.
|
int |
getPitch() |
Obtains the speaking pitch.
|
int |
getSpeaker() |
Obtains the speaking timbre.
|
int |
getSpeed() |
Obtains the speaking speed.
|
int |
getVolume() |
Obtains the speaking volume.
|
void |
setDeviceId(String deviceId) |
Sets the device ID.
|
void |
setDeviceType(int deviceType) |
Sets the device type.
|
void |
setPitch(int pitch) |
Sets the speaking pitch.
|
void |
setSpeaker(int speaker) |
Sets the speaking timbre.
|
void |
setSpeed(int speed) |
Sets the speaking speed.
|
void |
setVolume(int volume) |
Sets the speaking volume.
|
public String getDeviceId()
public void setDeviceId(String deviceId)
deviceId - Indicates the device ID.public int getDeviceType()
0 for a mobile phone, 1 for a speaker,
2 for a web-based device, 3 for a tablet, or 4 for a large screen.public void setDeviceType(int deviceType)
deviceType - Indicates the device type. The value can be 0 for a mobile phone, 1 for a
speaker, 2 for a web-based device, 3 for a tablet, or 4 for a large screen.public int getSpeed()
public void setSpeed(int speed)
speed - Indicates the speaking speed. The value can be any integer from 0 to 15. A larger value indicates a
higher speaking speed.public int getVolume()
public void setVolume(int volume)
volume - Indicates the speaking volume. The value can be any integer from 0 to 15. A larger value indicates
a higher speaking volume.public int getPitch()
public void setPitch(int pitch)
pitch - Indicates the speaking pitch. The value can be any integer from 0 to 15. A larger value indicates a
higher speaking pitch.public int getSpeaker()
0 for SPEAKER_XIAOYI; returns 1 for SPEAKER _YOYO.public void setSpeaker(int speaker)
speaker - Indicates the speaking timbre. The value 0 indicates SPEAKER_XIAOYI, and 1
indicates SPEAKER _YOYO.