Skip to main content
Version: 1.4.x

AIHuman.View.AIPlayer

Modifier and TypeMethod / Property Description
voidInit(string aiName, IAIPlayerCallback callback, IFrameImageProvider imageProvider) Initialize AIPlayer with the aiName received as a factor and register callback for health monitoring and image provider for AI rendering. (valid only when authenticated)
voidSend(string[] sentences) Let the AI speak. (using pure-text string)
voidSend(AIClipSet[] clips) Let the AI play. (using AIHuman.Model.AIClipSet)
voidStop() Stop the current conversation. It also deletes the content in the speaking queue.
voidPause() Pauses speaking.
voidResume() Continue speaking again from when it was paused.
voidPreload(string[] sentences) Prepare the sentences to be spoken in advance.
voidPreload(AIClipSet[] clips) Prepare the clips to be play in advance.
List<AIGesture>GetGestures() Get a list of gesture. (available gestures)
boolSetCustomVoice(CustomVoice cv) Set AI's voice to cv. return true if success.
CustomVoiceGetCustomVoice() Get the current CustomVoice object of set ai. It returns null if not set.
boolSetCustomVoiceForLanguage(string languageCode, string gender) Set the voice by the desired language and gender. All available languages when language null is entered, and all genders when null is entered in gender are searched and set as the first voice. If it succeeds, it returns true. Otherwise the default voice will be set.
voidRelease() Called when release AIPlayer.
floatSpeed { get; set; } Get or Set the AI's speech rate.
floatScale { get; set; } Get or Set the AI's scale.
floatVolume { get; set; } Get or Set the AI's volume.
boolIsMute { get; set; } Get or Set the AI's Mute.
AIPlayerStateState { get; } Get the state of AIPlayer
stringAIName { get; } Get the AI name.
stringAIGender { get; } Get the AI gender.
stringAILanguage { get; } Get the AI language.
boolCanPreload { get; } It brings whether AI is in a preloadable state.
boolIsConnected { get; } It brings whether AI is connected.
voidReconncet(Action<bool> callback) Attempt to reconnect AI. Return the reconnection result via callback.