Touchpoint
Native Voice
Touchpoint UI supports voice input to allow your users to talk to your applications over the internet.
Enabling Voice Input
To enable voice mode, set:
userId
to a"string"
in theconfig
objection within theTouchpointConfiguration
.input
option in yourTouchpointConfiguration
to"voice"
1import { create } from "@nlxai/touchpoint-ui"; 2 3const touchpointConfig = { 4 config: { 5 applicationUrl: "YOUR_NLX_BOT_URL", 6 headers: { "nlx-api-key": "YOUR_NLX_API_KEY" }, 7 languageCode: "en-US", 8 userId: "userId", // required to use for voice 9 }, 10 input: "voice", // Key setting to enable voice input 11 // Other settings like theme, brandIcon, etc. 12}; 13 14const touchpoint = await create(touchpointOptions);
User Experience
- The user clicks the microphone icon to start/stop voice input.
- Visual cues (like the
Ripple
animation) indicate when the application is speaking or listening.
Prerequisites
- Your NLX application deployment must be configured to support voice integration for the API channels.
- The browser must support the WebRTC APIs.
- Users must grant microphone permission when prompted by the browser.
Customization
- The visual appearance is controlled by the standard Touchpoint UI Theming