Skip to Content
Nuance LabsDocs

Overview

Build your own real-time app around a Nuance AI persona, with Nuance Live.

Nuance Live is the API for building your own real-time experience around a Nuance AI persona. The persona talks with the user over audio and video, and your page or app exchanges JSON events with the session while it does:

  • You follow the conversation: the user's words and the persona's as they're said, when its reply ends, when it hands work off.
  • You steer the persona: tell it what just happened in your app, ask it to speak, stop it mid-sentence, keep it quiet while the user reads.
  • Your page or a backend does the work: when the user needs something done, the persona can hand it off, and then says what it found. By default your page does the task and tells the persona how it went; with a responses delegation, a backend does it and can call your function tools, which your page runs; with none, nothing is handed off (Delegation and tools).

Your server holds the secret API key; your page or app never sees it, only a short-lived session token and, to join the conversation's room, the admitted event's token (Connect). Keys come from the Nuance platform.

your server ──(API key nk_…)──► POST /session-tokens ──► st_… token
your app    ──(token st_…)───► POST /conversation ──► LiveKit room ──► nuance_live events

The API is in preview: routes and events may change before 1.0, and conversations run on shared capacity. A start can be turned away when no capacity is free, and a running conversation can end early. See When capacity is short.

How a session runs

  1. Your server mints a session token with the session's settings: the persona's prompt, the backend and its tools, and the persona's own tools. The token fixes them, except the delegation settings allowed by session.update. See Set up a session.
  2. Your page or app creates the conversation with the token and joins its LiveKit room, publishing the microphone. See Connect.
  3. The session starts by itself and sends session.started. The persona doesn't speak first: speak to it, or send response.create to have it open.
  4. Both sides exchange events as JSON on the room's nuance_live data topic: the events you send and the events you get. Audio is never an event: the user's voice and the persona's ride the room's audio tracks, so session.input_audio.append is refused.
  5. Either side ends it: you send session.close, the time limit runs out, or the persona ends the call when its end_call tool is on (its built-in tools).

In a web page, the JavaScript SDK (@nuancelabs/js-sdk) runs steps 2 to 5 for you. Anywhere else, any LiveKit SDK works: in a browser (livekit-client) or a native app (Swift, Android, Flutter, React Native, Unity or Rust).

The persona's replies

You ask the persona to speak with response.create, but its replies have no response.* events of their own. The persona's words come as session.output_transcript.delta, its audio on its track, and session.output_audio.done says a reply has ended. The response.* events you get are the backend's work on a task, nested in response.event. A client that waits for response.done, or for the persona's next words, will hang: to know when a spoken reply has ended, wait for session.output_audio.done; a reply that said nothing does not send one (Events you get).

On this page