ultron-ai-sdk 1.1.6 → 1.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -24,7 +24,7 @@ npm install ultron-ai-sdk
24
24
  let character
25
25
 
26
26
  const init = async() => {
27
- sceneCanvas = new SceneCanvas('target-html-element')
27
+ sceneCanvas = new SceneCanvas('target-html-element-id')
28
28
  const initializationSetting= {
29
29
  avatarId: "AVATAR_ID", // AvatarId and Request Id are same
30
30
  config:{
@@ -62,7 +62,7 @@ npm install ultron-ai-sdk
62
62
  let character
63
63
 
64
64
  const init = async() => {
65
- sceneCanvas = new SceneCanvas('target-html-element')
65
+ sceneCanvas = new SceneCanvas('target-html-element-id')
66
66
  const initializationSetting= {
67
67
  avatarId: "AVATAR_ID", // AvatarId and Request Id are same
68
68
  config:{
@@ -70,9 +70,10 @@ npm install ultron-ai-sdk
70
70
  // sessionId: "SESSION_ID_FOR_CURRENT_USER" // Recomended method for secure access
71
71
  },
72
72
  options:{
73
- hideClickMessage: true // Remove default "Click message" on the avatar
73
+ hideClickMessage: true, // Remove default "Click message" on the avatar
74
74
  alwaysListen: false, // For Push to talk conversation
75
- highFidelityMode: true // Enables higher graphics quality (can impact performance on low-end devices)
75
+ highFidelityMode: true, // Enables higher graphics quality (can impact performance on low-end devices)
76
+ hideMicButton: false
76
77
  }
77
78
  }
78
79
  await sceneCanvas.init(initializationSetting)
@@ -113,7 +114,7 @@ Check out the sample app git repository: [🔗React SDK Sample](https://github.c
113
114
 
114
115
  ```html
115
116
 
116
- <div id="target-html-element"></div>
117
+ <div id="target-html-element-id"></div>
117
118
 
118
119
  ```
119
120
 
@@ -123,7 +124,7 @@ Check out the sample app git repository: [🔗React SDK Sample](https://github.c
123
124
 
124
125
  ```javascript
125
126
 
126
- let sceneCanvas = new SceneCanvas('target-html-element')
127
+ let sceneCanvas = new SceneCanvas('target-html-element-id')
127
128
 
128
129
  await sceneCanvas.init({
129
130
  avatarId: "AVATAR_ID",
@@ -226,23 +227,40 @@ Note: Please use the method above to get session id on your server side for a se
226
227
 
227
228
  Makes the character listen all the time once click for continous conversation (voice to voice)
228
229
 
229
- - `alwaysListen`: **Boolean** - The unique identifier for the avatar
230
+ - `alwaysListen`: **Boolean**
230
231
 
231
232
  ## Hide default click message
232
233
 
233
234
  Hides the default text message on the avatar to prompt user to click as an initial click is required for any audio to play in any browser
234
235
 
235
- - `hideClickMessage`: **Boolean** - The unique identifier for the avatar
236
+ - `hideClickMessage`: **Boolean**
236
237
 
237
238
 
238
239
  ## High Fidelity mode
239
240
 
240
241
  Enables very high quality renders with better lighting and details, but it will require more performance
241
242
 
242
- - `highFidelityMode`: **Boolean** - The unique identifier for the avatar
243
+ - `highFidelityMode`: **Boolean**
243
244
 
244
245
 
245
- ## Core Methods
246
+ ## Hide Mic button
247
+
248
+ Hide the default mic button, This can be use if want to add your own buttons
249
+
250
+ - `hideMicButton`: **Boolean**
251
+
252
+
253
+ ## Show background model
254
+
255
+ Use this only if you want show a existing background 3D Modal assigned on Ultron Portal
256
+
257
+ - `showBackgroundModel`: **Boolean**
258
+
259
+
260
+
261
+
262
+
263
+ # Core Methods
246
264
 
247
265
  ### loadAvatar(avatarId)
248
266
 
@@ -328,7 +346,7 @@ ultronSDK.setAudioInputDevice(myDevice.deviceId)
328
346
  let character
329
347
 
330
348
  const init = async() => {
331
- sceneCanvas = new SceneCanvas('target-html-element')
349
+ sceneCanvas = new SceneCanvas('target-html-element-id')
332
350
  const initializationSetting= {
333
351
  avatarId: "AVATAR_ID/REQUEST_ID",
334
352
  config:{
@@ -391,6 +409,33 @@ Set the background image of target html block in which the character is present.
391
409
  sceneCanvas.setBackgroundImage('IMAGE_URL')
392
410
 
393
411
  ```
412
+ Note: If `showBackgroundModel` is set to `true` background image will not be visible
413
+
414
+ ---
415
+
416
+ ### Stop Character
417
+
418
+ `stopCurrentSpeaking()` This method stops all the ongoing speaking activity of the Character.
419
+
420
+ ```javascript
421
+ charcater.stopCurrentSpeaking()
422
+
423
+ ```
424
+
425
+
426
+ ---
427
+
428
+ ### Detect speech completion
429
+
430
+ `onSpeakComplete()` this function is called when the character stops speaking.
431
+
432
+ ```javascript
433
+ charcater.onSpeakComplete=()=>{
434
+ //Do something when character stops speaking
435
+ }
436
+
437
+ ```
438
+
394
439
 
395
440
  ---
396
441