JavaScript SDK
Quick start
Set up the Duix H5 SDK and start your first real-time digital human session in under one minute.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Set up the Duix H5 SDK and start your first real-time digital human session in under one minute.
npm install duix-guiji-light --save
import Duix from 'duix-guiji-light';
// Create Duix instance
const duix = new Duix();
// Initialize SDK
duix.init({
sign: 'xxxx', // Authentication signature
containerLable: '.remote-container', // DOM container selector
conversationId: '', // Session ID
platform: 'duix.com' // Platform domain
});
duix.on('initialSuccess', () => {
// Start session after successful initialization
duix.start({
openAsr: true // Enable real-time ASR immediately
}).then(res => {
console.info('Session started:', res);
}).catch(err => {
console.error('Session start failed:', err);
});
});