MSML tag language

Updated at:

The Model Speech Synthesis Markup Language (MSML) lets you identify user behavior during a call, such as silence and user interrupts, and take actions, such as hanging up. This document describes the available MSML tags.

Overview

MSML tags are divided into input tags and output tags.

  • Output tags: Tags sent from the large model to the communication engine. You configure these tags based on your requirements.

  • Input tags: Tags sent from the communication engine to the large model.

Call control tags (output)

Call control tags instruct the communication engine to perform actions, such as hanging up or transferring the call to an agent.

1. Hang up

Tag

Description

Key attributes

Example

Notes

<hangup>

Hangs up the call after speaking the preceding text.

None

  • To hang up immediately:

    • <hangup/>

  • To hang up after a closing statement:

    • Goodbye!<hangup/>

This tag is compatible with TTS output.

Note

New input from the callee after the large model sends this tag may cancel the hang up.

<hangup-force>

Forces the call to hang up.

None

<hangup-force>Goodbye!</hangup-force>

-

2. Transfer to an agent

Tag

Description

Key attributes

Example

Notes

<transfer>

Transfers the call to an agent.

None, or custom variables passed through the tag.

  • Transfer without variables:

    • <transfer/>

  • Transfer with variables:

    • <transfer seatType="SKILL_GROUP" seatTypeValue="1000" number="0100*******" />

Configure the Transfer to an agent feature in Large Model Application Management.

When you pass variables, the attribute names are custom variable names defined for the agent transfer line. The attribute values are passed through the MSML tag. seatType, seatTypeValue, and number are example variable names, not a fixed set of required attributes.

Note

New input from the callee after the large model sends this tag may cancel the transfer.

Call behavior tags (input)

The communication engine uses call behavior tags to identify user actions during a call, such as silence or user interrupts.

Tag

Description

Key attributes

Example

Notes

<silence>

Indicates that a period of silence occurred during the call.

time: The duration of the silence.

<silence time="5s">

You must configure Silence Duration and Silence-triggered Model in the conversation attributes of Large Model Application Management.

<user-interrupt>

Indicates that the user interrupted the bot.

The tag is placed at the end of the bot's last utterance before the user interrupts.

<user-interrupt/>

-

<call-trigger-model>

Indicates a call connected event.

None

<call-trigger-model/>

You must enable the "Call Connection Trigger Model" switch in the conversation attributes of Large Model Application Management.

[
  {
    "role": "assistant",
    "content": "Hello, this is the courier service. A package with tracking number xxxx is out for delivery. Please be ready to receive it."
  },
  {
    "role": "assistant",
    "content": "Hello, based on the information you provided, your package is currently out for delivery. The specific delivery time can be affected by factors such as the courier's route and traffic conditions. If you need a more precise delivery time, we recommend using the logistics tracking feature in our app or contacting the courier directly to get the latest update.<user-interrupt/>"
  },
  {
    "role": "user",
    "content": "Okay, that's all for now."
  }
]