Skip to main content
Version: Latest

AI3DPlayer

Modifier and TypeMethod and Description
java.lang.StringgetAIName() get the name of the currently set ai
floatgetScale() get the scale of the currently set ai
floatgetSpeed() get the speed of the currently set ai
IAIPlayer.AIPlayerTypegetType() get the type of the currently set ai (AILIVE, UNITY)
voidinit(AIPlayerSettings config, IAIPlayerCallback callback) init after creation.
voidpausePlay()
voidpreload(java.lang.String requests) not supprot
voidpreload(java.lang.String[] request) not supprot
voidpreload(AIClipSet request) not supprot
voidpreload(AIClipSet[] requests) not supprot
voidrelease() release resource. should be called on 'onDestroy' etc.
voidresumePlay()
voidsend(java.lang.String request)
voidsend(java.lang.String[] requests) send speechs to speak
voidsend(AIClipSet requests) send speech or speech with gesture to speak
voidsend(AIClipSet[] requests) send speeches or speeches with gesture to speak
voidsetScale(float scale)
voidsetSpeed(float speed)
voidsetTopMargin(int topMargin) not support
voidstopSpeaking() stop speech if possible and clear all sentences in queue if possible
AIGesture[]getGestures() get gesture list.
booleansetCustomVoice(CustomVoice customVoice) set the CustomVoice of ai. return true if it succeeds. Null input will revert the voice to the default voice.
booleansetCustomVoiceForLanguage(String language, String gender) Set the voice by the desired language and gender. The AI's default language will be set when null for language is entered and this method returns true. If the language is not valid, also the default AI's voice will be set and returns false. When null is entered in gender, the AI's gender will be set and searched. And the voice will be set the first voice among the search result list. If the search and setting succeed, it returns true. Otherwise the default voice will be set and returns false.
CustomVoicegetCustomVoice() Get the current customVoice of set ai. It returns null if not set.
StringgetLanguageCode() get current voice's language (en or en-US format)
StringgetGender() get current ai's gender. MALE, FEMALE, UNI are possible and return null if the ai is not set.
AIPlayerStategetState() get current AIPlayer's State
booleanisConnected() check if AI is connected and can send
booleancanPreload() return false. (Not support)
booleanreconnect(IAIReconnectCallback reconnectCallback) reconnect when AI is not connected. Return false if it is connected or can't reconnect.