Skip to content

Realtime API Events

Speak

request.speak.text

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

ParameterTypeRequiredDefaultDescription
textstringThe text to speak
abortbooleanfalseAbort any earlier planned or ongoing speech. If false, new speech is queued
monitor_wordsbooleanfalseWhether 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
urlstringThe url from which to play audio
textstring"AUDIO"The corresponding text (for display purposes)
lipsyncbooleantrueWhether to perform lipsync
abortbooleanfalseWhether 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_rateint16000The sample rate of the audio data
lipsyncbooleantrueWhether to add automatic lipsync

request.speak.audio.data

Send audio data for streaming speech.

ParameterTypeRequiredDefaultDescription
audiostringBase64-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
partialbooleanfalseWhether to produce results while user is speaking
concatbooleantrueWhether to concatenate results during the same listening session
stop_no_speechbooleantrueStop listening if user silent for too long (no_speech_timeout)
stop_robot_startbooleantrueStop listening when robot start speaking
stop_user_endbooleantrueStop listening when end-of-speech is detected
resume_robot_endbooleanfalseResume listening when robot stopped speaking
no_speech_timeoutnumber8.0Timeout to use for stop_no_speech (seconds)
end_speech_timeoutnumber1.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_idstringVoice ID
namestringVoice name (partial, case insensitive)
providerstringVoice provider (partial, case insensitive)
languagestringVoice language (e.g. en-US)
genderstringVoice gender (male/female)
input_languagebooleantrueSet input language to same as voice

request.voice.status

Gets the current and available voices.

ParameterTypeRequiredDefaultDescription
voice_idbooleantrueCurrent voice id
voice_listbooleantrueList 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_idstringclosestThe ID of the user to attend, or 'closest'
slack_pitchnumber15Max difference (deg) between head pitch and gaze pitch
slack_yawnumber5Max difference (deg) between head yaw and gaze yaw
slack_timeoutnumber3000Max time (ms) head direction can diverge from gaze (-1 is infinite)
speedstringmediumSpeed 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
xnumberHorizontal position
ynumberVertical position
znumberDistance from robot
slack_pitchnumber15Max difference (deg) between head pitch and gaze pitch
slack_yawnumber5Max difference (deg) between head yaw and gaze yaw
slack_timeoutnumber3000Max time (ms) head direction can diverge from gaze (-1 is infinite)
speedstringmediumSpeed 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
namestringName of the gesture (see API for values)
intensitynumber1.0Intensity of the gesture
durationnumber1.0Duration of gesture
monitorbooleanfalseWhether to receive events when gesture starts and ends

Face

request.face.params

Set facial animation parameters directly.

ParameterTypeRequiredDefaultDescription
paramsobjectFace parameters

request.face.headpose

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

ParameterTypeRequiredDefaultDescription
yawnumber0Yaw (sideways) angle in degrees
pitchnumber0Pitch (up/down) angle in degrees
rollnumber0Roll angle in degrees
relativebooleanfalseWhether to use relative or absolute control
speedstringmediumSpeed 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_idstringKEEPface ID
visibilitybooleantrueTurn on or off face visibility
microexpressionsbooleantrueTurn on or off facial microexpressions
blinkingbooleantrueTurn on or off blinking
head_swaybooleanfalseTurn on or off automatic minor head sways

request.face.status

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

ParameterTypeRequiredDefaultDescription
face_idbooleantrueCurrent face id
face_listbooleantrueList of available faces

request.face.reset

Resets all facial parameters to default.

LED

request.led.set

Set the color of the LED.

ParameterTypeRequiredDefaultDescription
colorstringColor in hex format

request.led.set.individual

Set individual LED colors by index (0-85)

ParameterTypeRequiredDefaultDescription
ledsstringObject 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_rateint16000The sample rate of the audio data to receive
microphonebooleantrueWhether to capture the microphone
speakerbooleanfalseWhether 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.