Skip to main content
Version: Latest

AIPlayer

Details

IAIPlayer

  • assembly: AIHuman.SDK.Core
  • namespace: AIHuman.Interface

AIPlayer

  • assembly: AIHuman.SDK.WPF
  • namespace: AIHuman.Media
Modifier and TypeMethod / Property Description
ctorAIPlayer(IAIPlayerCallback callback) Create AIPlayer with Default AI and register callback for state monitoring. (valid only when authentication is complete)
ctorAIPlayer(IAIPlayerOptions options, IAIPlayerCallback callback) Create AIPlayer based on options and load AI. Register callback for health monitoring. (Authentication required)
object(AIPlayerView)GetObject() It is the actual Control object to be linked(binding) with the View (Xaml) of the Cutom App.
voidSend(string[] sentences) Let the AI speak. (using pure-text string)
voidSend(AIClipSet[] clips) Let the AI play. (using AIHuman.Common.Model.AIClipSet)
voidStopSpeaking() 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.
Collection<AIGesture>GetGestures() Get a collection 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 = null) 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.
floatSpeed { get; set; } Get or Set the AI's speech rate.
floatScale { get; set; } Get or Set the AI's scale.
AIHuman.Common.MarginMargin { get; set; } Get or Set the AI's margin.
doubleVolume { get; set; } Get or Set the AI's volume.
boolIsMute { get; set; } Get or Set the AI's mute.
stringAIName { get; } Get the AI's name.
stringAIGender { get; } Get the AI's gender.
stringAILanguageCode { get; } Get the AI's language code.
AIHuman.Interface.AIPlayerStateState { get; } Get the current state of the AIPlayer.
boolIsConnected { get; } Get the network connection with the AI.
stringReconncet(int attempts = 5, int delay = 3000, Action<bool> callback = null) Attempt to reconnect with AI. callback can be invoked using optional parameters.
voidDisconnect(Action<bool> callback = null) Disconnect network connection with AI, callback can be invoked using optional parameters.
voidDispose() Called when destroying AIPlayer.

AIPlayerOptions

  • assembly: AIHuman.SDK.Core
  • namespace: AIHuman.Common
Modifier and TypeMethod / Property Description
ctorAIPlayerOptions(string aiName = null, float aiScale = 1.0f, float aiSpeed = 1.0f, Margin aiMargin = null, bool aiDisconnect = false, AIPlayerCachingStrategy aiCaching = AIPlayerCachingStrategy.V1) Creates an object for use when creating (initializing) AIPlayer objects.
stringAIName { get; set; } Get or Set the identifier of the AI you want to initialize. The identifier is obtained from AIList.AI.aiName.
floatAIScale { get; set; } Get or Set the scale of the AI you want to initialize.
AIHuman.Common.MarginAIMargin { get; set; } Get or Set the margin of the AI you want to initialize.
floatAISpeed { get; set; } Get or Set the spped of the AI you want to initialize.
boolAIDisconnection { get; set; } When set to true, the AI is initialized with a disconnected network.
AIHuman.Interface.AIPlayerCachingStrategyAICachingStrategy { get; set; } Get or Set the caching strategy of the AI you want to initialize.
intCacheLimit { get; set; } Get or Set the maximum cache limit of the AI you want to initialize.



(For on-premises customers)

ServerConfiguration

  • assembly: AIHuman.SDK.Core
  • namespace: AIHuman.Common

Used as a parameter when using the SetConfig function of AIAPI.

You can set the server address that you want to change at the time of ServerConfiguration object creation or using a SetValue(key, value) function.

The key (string) members required for this setting are internally defined.

info

KEY_AUTH_SERVER_ADDR: Authentication server address
KEY_MID_SERVER_ADDR: Mid server address
KEY_RESOURCE_SERVER_ADDR: Resources server address
KEY_BACKEND_SERVER_ADDR: Backend server address

Customers who use cloud services do not need to be aware of this.

Supporting Offline Mode

(Features covered by CES 2024)

Supports SDK-driven modes that can operate without network communication based on local caching.


Contact