Voice commands
The voice routes turn a guest's words into one action from a closed list, and send playback and navigation commands to the room TV. The API only returns the action: the guest app runs it, so a spoken request can do only what a button press can, in the guest's own room.
Resources¶
| Resource | What it is |
|---|---|
| Voice intent | The one action a sentence means, from a closed list. |
| Playout command | A command sent to the room TV: navigate, channel, volume, D-pad, power. |
| Destination | A section of the TV's home screen voice can open, with optional rows. |
Authentication and permissions¶
/voice/… and /playout/command need a guest session token. /tv/voice/… routes need the TV's device token. See the
Concierge API.
Base path¶
Capabilities¶
- Keyword grammar in English, Thai, Chinese, Japanese, Korean and Malay (non-English phrases are not yet reviewed by native speakers)
- AI fallback for sentences the grammar doesn't know, with an 8-second limit
- Speech to text for a recorded clip (
/voice/transcribe) - Hosted text to speech, when the hotel has it switched on
- One destination list per hotel: today one list serves every hotel (planned)
- Answering questions by voice: a question becomes an action or a one-line suggestion, never an answer (planned)
Object model¶
Voice intent¶
POST /voice/intent with {"transcript": "show me the dragon course"} (required, at most 200 characters).
| Field | Type | Description |
|---|---|---|
action |
string | One of the actions below, or none. |
amount |
integer | Repeat count for volume, channel and temperature steps, 1-10. |
value |
integer | temp_set only: the target in °C, 16-30. |
target, item |
string | go_to only: a destination and, optionally, a row in it. |
label |
string | The name the guest sees, for example TV Guide. |
say |
string | Only with action: none from the AI fallback: one short line in the guest's language, at most 140 characters. |
source |
string | grammar, ai or none. |
{ "success": true, "data": { "action": "go_to", "target": "Golf", "item": "dragon", "label": "Golf", "source": "grammar" } }
action |
What the guest app runs |
|---|---|
volume_up, volume_down |
VOLUME_UP / VOLUME_DOWN playout command, amount times (default 3) |
channel_next, channel_prev |
NEXT_CHANNEL / PREV_CHANNEL, amount times |
pause, resume |
PAUSE / RESUME |
portal_open, portal_close |
PORTAL_OPEN / PORTAL_CLOSE |
nav_up, nav_down, nav_left, nav_right, nav_ok |
D-pad commands |
tv_on, tv_off |
PATCH /room with tvOn (room state only) |
temp_up, temp_down, temp_set |
PATCH /room with temp (room state only) |
go_to |
NAVIGATE playout command with target and item |
open_cast |
Opens the guest app's Cast tab. Nothing is sent to the TV. |
none |
Shows say if present. |
If the grammar finds nothing, the AI fallback tries once; a timeout, an error or an invalid answer gives
{"action": "none", "source": "none"}. The answer is always checked against the lists here before it is returned.
Destinations¶
target is the TV's menu key and must match exactly. item is a fragment of a row title.
target |
Label | item values |
|---|---|---|
Golf |
Golf | phoenix, dragon, champion, tee-time, green fee |
Explore |
Explore | waterpark, more parks, lagoon, pyramid, kuala lumpur, getting here, about, meetings |
Dining |
Dining | breakfast, in-room, reserve |
Concierge |
Concierge | wake-up, airport, housekeeping, phone connect |
Guide |
TV Guide | none |
Watch |
Watch TV | none (full-screen live TV) |
Apps |
TV Apps | weather, netflix, youtube, world time, currency, flight, ambient, discover |
Facilities |
Facilities | swimming, clubhouse, pro shop, villa, condo, infinity, fitness, family room |
Stay |
My Stay | messages, bill, bookings |
A TV that doesn't have a section ignores a NAVIGATE for it.
Playout command¶
POST /playout/command (guest session) sends one command to the TV paired to the session, or the TV registered in the
stay's room.
| Field | Type | Description |
|---|---|---|
command |
string | PLAY, PAUSE, RESUME, STOP, NEXT_CHANNEL, PREV_CHANNEL, JUMP_CHANNEL, OPEN_APP, NAVIGATE, UP, DOWN, LEFT, RIGHT, OK, VOLUME_UP, VOLUME_DOWN, SET_VOLUME, PORTAL_OPEN, PORTAL_CLOSE. |
channelId |
string | Required for JUMP_CHANNEL. |
volume |
integer | Required for SET_VOLUME, 0-100. |
appId, deepLink |
string | OPEN_APP: required app ID, and an optional link the app may ignore. |
target, item |
string | NAVIGATE: a destination from the table, and an optional row of it. |
Speech¶
| Route | Auth | Body | Result |
|---|---|---|---|
POST /voice/transcribe |
Guest | Multipart: file (audio, at most 2 MB), lang (en, th, vi, zh, ms, ja, auto), final (1 on the last clip), seq, notv (1 to keep the text off the TV) |
{text, final, tv, lang} |
POST /voice/speak |
Guest | {"text", "lang"} |
Audio bytes. |
POST /tv/voice/transcribe |
Device | The same multipart | {text, …} |
POST /tv/voice/speak |
Device | {"text", "lang"}; add ?url=1 to get {url} |
Audio, or a short-lived address. |
GET /tv/voice/audio/{id} |
None | none | The audio from ?url=1, kept for 10 minutes. |
Errors¶
| Status | When | What to do |
|---|---|---|
400 |
transcript missing or over 200 characters; unknown command; target or item not in the table; SET_VOLUME without volume; JUMP_CHANNEL without channelId; OPEN_APP without appId; text missing |
Fix the request. |
401 |
No valid guest or device token | Sign in again. |
409 |
No TV is paired to the session or assigned to the room | Pair the TV. |
413 |
Audio clip empty or over 2 MB | Send a shorter clip. |
429 |
Speech to text is busy, or too many requests | Wait a moment; fall back to typing. |
501 |
Hosted voice isn't set up for this hotel | Use the device's own voice. |
502 |
The voice service couldn't speak | Retry. |
503 |
The TV couldn't be reached within 5 seconds | Retry. |
No voice route returns a list, so nothing here is paginated. Bodies as returned:
400. Others: transcript must be at most 200 characters, text is required, invalid JSON: <detail>.
401. A device-token route says device token required or invalid device token.
{ "success": false, "error": "no playout display is paired with this session or assigned to this room" }
409.
429.
501. A 502 says the voice service could not speak just now, and a 503 says failed to reach the display.
Endpoints¶
| Method and path | Auth | What it does |
|---|---|---|
POST /voice/intent |
Guest | Sentence to one intent. |
POST /playout/command |
Guest | Send a command to the room TV. |
POST /voice/transcribe, POST /voice/speak |
Guest | Speech to text, text to speech. |
POST /tv/voice/transcribe, POST /tv/voice/speak, GET /tv/voice/audio/{id} |
Device, none for audio | The same for the TV's own microphone. |