Skip to content

Web voice

Web voice is a voice call that runs in the visitor’s browser. No phone number or carrier is involved. The visitor allows the microphone, talks to the agent, and hangs up when done.

There are two ways to add it:

  • The website widget: the same one-line script as web chat. It shows a call button when the agent has Voice over Web on.
  • Your own page with the SDK: the NuacemOne SDK starts the call and the LiveKit client library carries the audio. Use this when you build your own call screen.
  • An agent with Voice over Web turned on in its Channels, and published. Calls always use the live version.
  • A publishable key whose allowed websites include your site’s origin. See API keys.
  • An https page. Browsers only give the microphone to secure pages.
  1. Open the agent and go to Deploy → Website widget.
  2. Copy the one-line snippet under Chat window design and paste it before </body>. See Web chat widget.
  3. If the agent has both web chat and web voice on, the window offers both. In Design Studio’s Voice section, choose whether the chat or the call opens first, or let the visitor choose, and where the call button sits (header, input bar or both).

The Voice section also sets the call screen: the animation, live captions, the controls (mute, speaker, captions, keyboard), the call timer, a short summary after the call and a rating. You can add a consent line under the call button.

  1. Open the agent and go to Deploy → SDK & API.

  2. Copy the web call sample. It loads the NuacemOne SDK and the LiveKit client library from the console:

    <script src="https://studio.nuacem.dev/sdk/nuacemone.js"></script>
    <script src="https://studio.nuacem.dev/widget/vendor/livekit-client-2.22.3.umd.js"></script>
    <script type="module">
    const client = NuacemOne.client({ key: 'YOUR_PUBLISHABLE_KEY', gateway: 'GATEWAY_URL' });
    const call = await client.agents.call('AGENT_ID'); // { livekitUrl, token, maxDurationSeconds, … }
    const room = new LivekitClient.Room();
    await room.connect(call.livekitUrl, call.token);
    await room.localParticipant.setMicrophoneEnabled(true);
    // Leaving the room ends the call: await room.disconnect();
    </script>

    For a use case, use client.useCases.call('USE_CASE_ID').

  3. Replace the key and keep the gateway address the console shows.

  4. Build your own controls around the room object (mute, hang up, captions).

To identify a signed-in user, pass the user id and hash as described in Signed identity.

The browser asks the visitor to allow the microphone when the call starts. If they block it, the widget shows “Allow microphone access to start a call.” They can change the permission in the browser’s address bar and try again.

A call ends when:

  • the visitor hangs up or closes the page,
  • it reaches your organisation’s maximum call length (the SDK returns it as maxDurationSeconds), or
  • nobody speaks for a while. The agent first asks if the caller is still there.

When the time limit is reached, the agent tells the caller the call is ending before it hangs up.

  • Test pages: Deploy → Test pages → Download test page gives an HTML file with a call button that uses the agent’s latest saved draft. It works before you publish, until it expires (1, 7 or 30 days) or you stop it. See Web chat widget.
  • Test call in the console: the agent editor’s test call runs in your browser in the same way.
  • Voice over Web is on and the agent is published.
  • Your page is served over https.
  • The publishable key lists every origin that starts calls.
  • You have tried a call on a phone browser as well as a desktop one.
  • If you show a consent line, it matches your privacy notice.

Web calls count towards your organisation’s call minutes and its limit on calls at the same time. New calls are rate-limited per network, per website and per visitor. When every line is in use, the visitor sees “All lines are busy right now. Please try again in a few minutes.”

Symptom Fix
“Allow microphone access to start a call.” The visitor blocked the microphone. Allow it in the browser and start again. Check the page is https.
“Web calls are switched off for this assistant.” Turn on Voice over Web in the agent’s Channels and publish.
“This assistant chats in text; it does not take calls.” The agent has no voice channel. Turn on Voice over Web, or use web chat.
“This assistant is not available right now.” Publish the agent.
“This key cannot be used from this website.” Add the page’s origin to the key’s allowed websites.
“All lines are busy right now…” Your organisation is at its limit of calls at the same time. Try later, or ask your NuacemOne contact about the limit.
“Voice calls are starting up.” or “Calls are unavailable right now.” A temporary problem. Try again in a minute.
“You have started too many calls today.” The visitor hit the daily limit for one person.
The call connects but the agent cannot hear Check the right microphone is selected in the browser and that another app is not holding it.