Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Speech markers are triggers that can be included within the Digital Person's text response in order to make some action happen. Speech markers always begin with an `@` symbol, and often require one or more parameters to be passed to them. Note: Depending on your conversation provider you may need to escape Speech Markers. For example in IBM Watson Assistant @attendObject would have to be written as \@attendObject.

Speech markers are not spoken by the Digital Person, but they do cause the related action to occur at the point in the speech where the speech marker appears in the text.

The use of the following speech markers in a particular response will disable equivalent autonomous behaviour for that response.

@attendObject

@attendObject([object_id: str], [start_time(optional): float], [duration(optional): float])

The Digital Person should look towards the on-screen object with the given id. Requires Real-Time Gesturing and a UI which supports Content Awareness.

object_id: string
(required)

The id of the on-screen element that the Digital Person should look towards.

For the Default UI this is supported for content blocks, and should use the same object_id as would be used for the @showcards() speech marker.

For a custom UI this is supported for any element marked up with the data-sm-content="objectId" HTML attribute. See [WebSDK / Content Awareness].

start_time: float

The number of seconds delay before the Digital Person should look towards the on-screen element. This delay is relative from the point in speech that the speech marker is reached.

default: 0 (zero seconds, no delay)

duration: float

The number of seconds that the Digital Person should continue looking at the on-screen element.

default: 1 (one second)


@gestureObject

@gestureObject([object_id: str], [start_time(optional): float], [duration(optional): float])

The Digital Person should gesture towards the on-screen object with the given id. Requires Real-Time Gesturing and a UI which supports Content Awareness.

The Digital Person will only perform the gesture if the screen aspect ratio is wide enough for the gesture to look natural, and if the content does not overlap the Digital Person.

object_id: string
(required)

The id of the on-screen element that the Digital Person should gesture towards.

For the Default UI this is supported for content blocks, and should use the same object_id as would be used for the @showcards() speech marker.

For a custom UI this is supported for any element marked up with the data-sm-content="objectId" HTML attribute. See [WebSDK / Content Awareness].

start_time: float

The number of seconds delay before the Digital Person should look towards the on-screen element. This delay is relative from the point in speech that the speech marker is reached.

default: 0 (zero seconds, no delay)

duration: float

The number of seconds that the Digital Person should continue looking at the on-screen element.

default: 1 (one second)

  • No labels