目录

com.huawei.hms.mlsdk.tts.MLTtsConstants

Defines TTS SDK constants.

Constant Summary

TypeNameDesc
intEVENT_PLAY_START

ID of the playback start event.

intEVENT_PLAY_PAUSE

ID of the playback pause event.

intEVENT_PLAY_RESUME

ID of the playback resumption event.

intEVENT_PLAY_STOP

ID of the playback stop event.

intEVENT_SYNTHESIS_START

ID of the audio synthesis start event.

int

EVENT_SYNTHESIS_END

ID of the audio synthesis end event.

int

EVENT_SYNTHESIS_COMPLETE

ID of the audio synthesis completion event (that is, the synthesized audio data is completely processed).

StringTTS_EN_USEnglish (US).

String

TTS_LAN_ES_ES

Spanish (Spain).

String

TTS_LAN_FR_FR

French (France).

StringTTS_SPEAKER_FEMALE_ENEnglish female voice.
StringTTS_SPEAKER_FEMALE_ZHChinese female voice.
StringTTS_SPEAKER_MALE_ENEnglish male voice.
StringTTS_SPEAKER_MALE_ZHChinese male voice.
StringTTS_ZH_HANSSimplified Chinese.

String


TTS_SPEAKER_FEMALE_ES

Spanish standard female voice.

String

TTS_SPEAKER_FEMALE_FR

French standard female voice.

String

EVENT_PLAY_STOP_INTERRUPTED

Indicates whether playback is interrupted abnormally, which corresponds to the key value in Bundle of a playback stop event.
String

EVENT_SYNTHESIS_INTERRUPTED

Indicates whether playback is interrupted abnormally, which corresponds to the key value in Bundle of an audio synthesis completion event.

Constants

Constant
public static final int EVENT_PLAY_START

ID of the playback start event.

Constant value: 1

Constant
public static final int EVENT_PLAY_PAUSE

Playback pause callback. 

Constant value: 3

Constant
public static final int EVENT_PLAY_RESUME

Playback resumption callback. 

Constant value: 2

Constant
public static final int EVENT_SYNTHESIS_STAR

ID of the audio synthesis start event.

Constant value: 5

Constant
public static final int EVENT_PLAY_STOP

ID of the playback stop event.

Constant value: 4

Constant
public static final int EVENT_SYNTHESIS_END

ID of the audio synthesis end event.

Constant value: 6

Constant
public static final int EVENT_SYNTHESIS_COMPLETE

ID of the audio synthesis completion event (that is, the synthesized audio data is completely processed).

Constant value: 7

Constant
public static final String EVENT_PLAY_STOP_INTERRUPTED

Indicates whether playback is forcibly stopped. You need to use interrupted to search for the value of EVENT_PLAYSTOP_INTERRUPTED in the value of bundle.

Constant value: interrupted

Constant
public static final String TTS_EN_US

English (US). 

Constant value: en-US

Constant
public static final String TTS_ES_ES

Spanish (Spain).

Constant Value: "es-ES"

Constant
public static final String TTS_FR_FR

French (France).

Constant Value: "fr-FR"

Constant
public static final String TTS_SPEAKER_FEMALE_EN

English female voice. 

Constant value: Female-en

Constant
public static final String TTS_SPEAKER_FEMALE_ZH

Chinese female voice. 

Constant value: Female-zh

Constant
public static final String TTS_SPEAKER_MALE_EN

English male voice. 

Constant value: Male-en

Constant
public static final String TTS_SPEAKER_MALE_ZH

Chinese male voice. 

Constant value: Male-zh

Constant
public static final String TTS_ZH_HANS

Simplified Chinese. 

Constant value: zh-Hans

Constant
public static final String TTS_SPEAKER_FEMALE_ES

Spanish standard female voice.

Constant Value: "es-ES-st-1"

Constant
public static final String TTS_SPEAKER_FEMALE_FR

French standard female voice.

Constant Value: "fr-FR-st-1"