SpeechCue SpeechCue SpeechCue SpeechCue SpeechCue Class

Definition

Represents a speech cue that can be included in a TimedMetadataTrack. This cue can be used to receive events based on metadata included in a text-to-speech (TTS) stream, such as word boundaries, sentence boundaries, and Speech Sythesis Markup Language (SSML) bookmarks.

public : sealed class SpeechCue : IMediaCue
struct winrt::Windows::Media::Core::SpeechCue : IMediaCue
public sealed class SpeechCue : IMediaCue
Public NotInheritable Class SpeechCue Implements IMediaCue
var speechCue = new speechCue();
Attributes

Windows 10 requirements

Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

Remarks

A SpeechCue can be added to a TimedMetadataTrack with the AddCue method. When the cue's start time is reached, the CueEntered event is raised and you can use the MediaCueEventArgs passed into the handler to get a copy of the SpeechCue.

The SpeechSynthesizer class generates metadata that uses the following values for the TimedMetataTrack.Label in order to identify the type of speech metadata included in a track.

LabelDescription
SpeechBookmarkThe metadata track contains SSML bookmarks.
SpeechSentenceThe metadata track contains sentence boundaries.
SpeechWordThe metadata track contains word boundaries.

Constructors

SpeechCue() SpeechCue() SpeechCue() SpeechCue() SpeechCue()

Initializes a new instance of the SpeechCue class.

Properties

Duration Duration Duration Duration Duration

Gets or sets the duration of the cue.

EndPositionInInput EndPositionInInput EndPositionInInput EndPositionInInput EndPositionInInput

Gets or sets the offset into the string contained in the Text property of the last character in the word or sentence associated with the cue.

Id Id Id Id Id

Gets the identifier for the timed metadata track

StartPositionInInput StartPositionInInput StartPositionInInput StartPositionInInput StartPositionInInput

Gets or sets the offset into the string contained in the Text property of the first character in the word or sentence associated with the cue.

StartTime StartTime StartTime StartTime StartTime

Gets the start time of the cue.

Text Text Text Text Text

Gets or sets the text associated with the speech cue.