Developers

Voice+

Try live

You can generate the setup code for your scripts directly on this configuration page.

Setup snippet

1<script defer src="https://unpkg.com/@nlxai/voice-plus-core/lib/index.umd.js"></script> 2<script> 3 const contentLoaded = () => { 4 if (document.readyState === "loading") { 5 return new Promise((resolve) => { 6 window.addEventListener("DOMContentLoaded", () => { 7 resolve(); 8 }); 9 }); 10 } else { 11 return Promise.resolve(); 12 } 13 }; 14 15 contentLoaded().then(() => { 16 const client = nlxai.voicePlusCore.create({ 17 // hard-coded params 18 apiKey: "REPLACE_WITH_API_KEY", 19 workspaceId: "REPLACE_WITH_WORKSPACE_ID", 20 scriptId: "REPLACE_WITH_SCRIPT_ID", 21 // dynamic params 22 conversationId: "REPLACE_WITH_CONVERSATION_ID", 23 languageCode: "en-US", 24 }); 25 26 client.sendStep("REPLACE_WITH_STEP_ID"); 27 }); 28</script>