waveform-linesVoice

Example set up of a voice application

Setting up a voice application is almost identical to setting up a text application. The only necessary difference is adding an input: "voice" attribute:

<html lang="en">
  <head>
    <title>Touchpoint Sample HTML</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
  </head>
  <body>
    <script type="module">
      import { create } from "https://unpkg.com/@nlxai/touchpoint-ui/lib/index.js?module";
      
      const touchpoint = await create({
        config: {
          applicationUrl: "REPLACE_WITH_APPLICATION_URL",
          headers: {
            "nlx-api-key": "REPLACE_WITH_API_KEY"
          },
          languageCode: "en-US",
        },
        input: "voice"
      });
    </script>
  </body>
</html>

which results in the following voice touchpoint:

Last updated