Skip to content

Realtime API Events ​

Speak ​

request.speak.text ​

Make the robot say something using text-to-speech.

ParameterTypeRequiredDefaultDescription
textstring✅—The text to speak
abortboolean❌falseAbort any earlier planned or ongoing speech. If false, new speech is queued
monitor_wordsboolean❌falseWhether to send back response.speak.word while speaking

request.speak.audio ​

Make the robot play/say some audio from a URL. The audio must be in WAV format (not MP3).

ParameterTypeRequiredDefaultDescription
urlstring✅—The url from which to play audio
textstring❌"AUDIO"The corresponding text (for display purposes)
lipsyncboolean❌trueWhether to perform lipsync
abortboolean❌falseWhether to abort any earlier planned or ongoing speech

request.speak.stop ​

Make the robot stop speaking and/or abort any planned speech, or speech being generated.

Speak (Streaming) ​

request.speak.audio.start ​

Start speaking from streaming audio.

ParameterTypeRequiredDefaultDescription
sample_rateint❌16000The sample rate of the audio data
lipsyncboolean❌trueWhether to add automatic lipsync

request.speak.audio.data ​

Send audio data for streaming speech.

ParameterTypeRequiredDefaultDescription
audiostring✅—Base64-encoded audio data, 16-bit, mono, little-endian

request.speak.audio.end ​

Marks the end of audio data transmission. This should be sent after all audio chunks have been sent.

request.speak.stop ​

Stop speaking immediately. This command can be used to halt audio playback at any time.

Listen ​

request.listen.config ​

Configure speech recognition.

ParameterTypeRequiredDefaultDescription
languageslist❌["en-US"]List of languages to listen for
phraseslist❌[]List of words or phrases to listen extra carefully for

request.listen.start ​

Make the robot listen for speech. If it is already listening, it will reset the current result.

ParameterTypeRequiredDefaultDescription
partialboolean❌falseWhether to produce results while user is speaking
concatboolean❌trueWhether to concatenate results during the same listening session
stop_no_speechboolean❌trueStop listening if user silent for too long (no_speech_timeout)
stop_robot_startboolean❌trueStop listening when robot start speaking
stop_user_endboolean❌trueStop listening when end-of-speech is detected
resume_robot_endboolean❌falseResume listening when robot stopped speaking
no_speech_timeoutnumber❌8.0Timeout to use for stop_no_speech (seconds)
end_speech_timeoutnumber❌1.0Amount of silence needed to detect end-of-speech (seconds)

request.listen.stop ​

Force the robot to stop listening.

Voice ​

request.voice.config ​

Set the current voice, using either voice id, name, language, gender, or provider (or a combination).

ParameterTypeRequiredDefaultDescription
voice_idstring❌—Voice ID
namestring❌—Voice name (partial, case insensitive)
providerstring❌—Voice provider (partial, case insensitive)
languagestring❌—Voice language (e.g. en-US)
genderstring❌—Voice gender (male/female)
input_languageboolean❌trueSet input language to same as voice

request.voice.status ​

Gets the current and available voices.

ParameterTypeRequiredDefaultDescription
voice_idboolean❌trueCurrent voice id
voice_listboolean❌trueList of available voices

Attention ​

request.attend.user ​

Make the robot attend to a user. If the user is lost, the robot will attend nobody. If the user comes back later, the robot will attend to that user again. If the 'closest' user is specified, the robot will always attend the closest user.

ParameterTypeRequiredDefaultDescription
user_idstring❌closestThe ID of the user to attend, or 'closest'
slack_pitchnumber❌15Max difference (deg) between head pitch and gaze pitch
slack_yawnumber❌5Max difference (deg) between head yaw and gaze yaw
slack_timeoutnumber❌3000Max time (ms) head direction can diverge from gaze (-1 is infinite)
speedstring❌mediumSpeed of head movement (xslow, slow, medium, fast, xfast)

request.attend.location ​

Make the robot attend to a specific location, as specified in meters, relative to the robot.

ParameterTypeRequiredDefaultDescription
xnumber✅—Horizontal position
ynumber✅—Vertical position
znumber✅—Distance from robot
slack_pitchnumber❌15Max difference (deg) between head pitch and gaze pitch
slack_yawnumber❌5Max difference (deg) between head yaw and gaze yaw
slack_timeoutnumber❌3000Max time (ms) head direction can diverge from gaze (-1 is infinite)
speedstring❌mediumSpeed of head movement (xslow, slow, medium, fast, xfast)

request.attend.nobody ​

Make the robot attend to nobody.

Gestures ​

request.gesture.start ​

Make the robot perform a gesture.

ParameterTypeRequiredDefaultDescription
namestring✅—Name of the gesture (see API for values)
intensitynumber❌1.0Intensity of the gesture
durationnumber❌1.0Duration of gesture
monitorboolean❌falseWhether to receive events when gesture starts and ends

Face ​

request.face.params ​

Set facial animation parameters directly.

ParameterTypeRequiredDefaultDescription
paramsobject✅—Face parameters

request.face.headpose ​

Control the head pose of the robot, as specified in degrees along yaw, pitch and roll.

ParameterTypeRequiredDefaultDescription
yawnumber❌0Yaw (sideways) angle in degrees
pitchnumber❌0Pitch (up/down) angle in degrees
rollnumber❌0Roll angle in degrees
relativeboolean❌falseWhether to use relative or absolute control
speedstring❌mediumSpeed of head movement (xslow, slow, medium, fast, xfast)

request.face.config ​

Set the current mask and character (face_id), and/or face visibility.

ParameterTypeRequiredDefaultDescription
face_idstring❌KEEPface ID
visibilityboolean❌trueTurn on or off face visibility
microexpressionsboolean❌trueTurn on or off facial microexpressions
blinkingboolean❌trueTurn on or off blinking
head_swayboolean❌falseTurn on or off automatic minor head sways

request.face.status ​

Gets the current and available masks and characters (face_id).

ParameterTypeRequiredDefaultDescription
face_idboolean❌trueCurrent face id
face_listboolean❌trueList of available faces

request.face.reset ​

Resets all facial parameters to default.

LED ​

request.led.set ​

Set the color of the LED.

ParameterTypeRequiredDefaultDescription
colorstring✅—Color in hex format

request.led.set.individual ​

Set individual LED colors by index (0-85)

ParameterTypeRequiredDefaultDescription
ledsstring✅—Object mapping LED indices (0-85) to hex color values

Users ​

request.users.once ​

Detect users once.

request.users.start ​

Start detecting users.

request.users.stop ​

Stop detecting users.

Audio ​

request.audio.start ​

Start capturing audio from the microphone and/or speaker. Per default, only microphone will be captured.

ParameterTypeRequiredDefaultDescription
sample_rateint❌16000The sample rate of the audio data to receive
microphoneboolean❌trueWhether to capture the microphone
speakerboolean❌falseWhether to capture the speaker

request.audio.stop ​

Stops capturing audio from the microphone and/or speaker.

Camera ​

request.camera.once ​

Capture one frame from the camera.

request.camera.start ​

Start capturing video from the camera.

request.camera.stop ​

Stops capturing video from the camera.