Utterance
Module: Inworld.AI. Namespace: Inworld.Interactions. Inherited from IContainable
This data structure is used to host the utterances. Utterances contains several InworldPackets that should be aligned at the same expression. For example, its AudioPacket and its TextPackets are usually aligned as the same sentence.
Variables
Variables | Description |
---|---|
Packets | The dictionary to host its contained InworldPackets. The key is the InworldPackets's PacketID. The value is the InworldPackets itself. |
Properties
Properties | Description |
---|---|
ID | The UtteranceID. |
RecentTime | The recent modifying time of the utterance. |
Packets | The list of the InworldPackets. It's the values of the Packets in the Variables. |
IsEmpty | Check if the outgoing packet is empty. |
API
Function | Description | Parameters |
---|---|---|
Contains | Check if the InworldPacket is in this utterance. | InworldPacket: target packet. |
IsPlayable | Check if the utterance is playable (all the data has been received). | |
Add | Add an InworldPacket into this utterance. | InworldPacket: target packet to add. |
GetTextSpeed | Get the speed of the displaying text. Depending on the length of the text or narrative action. | |
GetAudioClip | Generate the AudioClip from this utterance if it contains any AudioPackets. | |
Cancel | Clear all the InworldPackets in this utterance. | isHardCancelling: not used. |
OnDequeue | Always return true in this class. |