Voice for robots

With lively.ai, your robot gets a voice that listens, takes turns and moves with what it says. One real-time API for speech and the body cues that go with it.

before the first sound
before the last sound
PersonPerson
Robot voice
Robot body
Looks at the speakerNodsSignals it will speakGestures with the wordsYields the turn
One exchange, left to right, acted out by the figure. The shaded bands show the lead: the robot signals that it will speak before its first sound, and yields the turn before its last.

What your robot gets

A conversation partner, not a speaker on wheels

How it works

One session carries the whole exchange

  1. Stream what the robot hears

    Open a session with your API key and send microphone audio as it arrives.

  2. Receive speech and turn cues

    The lively.ai API returns the robot's voice as audio and, ahead of the sound, turn cues: when the reply starts, where it pauses and when it ends.

  3. Play and perform

    The client plays the audio and calls your code at each cue, with the time left before the sound. Your mapping table picks the movement.

robot.py
import asyncio, os
from lively_ai import LivelyAI

# Your mapping: the movement that shows each turn cue.
MOVES = {
    "bid":         "lift_head",     # about to speak
    "hold":        "keep_posture",  # pause inside a reply
    "yield":       "face_partner",  # handing the turn over
    "cancelled":   "rest",          # reply dropped
    "interrupted": "rest",          # the person cut in
}

async def main():
    client = LivelyAI(api_key=os.environ["LIVELY_API_KEY"])
    session = client.session(language="en")

    @session.on_turn_cue
    def move(cue):
        # lead_ms: time left until the sound it announces
        robot.play(MOVES[cue.name], within_ms=cue.lead_ms)

    await session.run(microphone, speaker)

asyncio.run(main())

Cue mapping

One set of cues, any body

A turn cue says where the robot is in its turn, not which joints to move. A mapping table on your side names the movement that shows each cue on your robot. Showing a cue differently is a change to the table, not to code.

CueHumanoid with no neck or eyesAvatar on a screen
Bidabout to speakWaist turns aside, one arm risesMouth opens, eyes and head turn away
Holdpause inside a replyStays turned, arm stays upKeeps looking away
Yieldhanding the turn overArm lowers, torso faces the partnerEyes return to the partner, mouth closes
Interruptedthe person cut inReturns to listening at onceReturns to listening at once

Two example mappings. Yours can use any movement your robot has.

Give your robot a voice

Create a lively.ai account and tell us about your use case. Our team will contact you.