Redigera

Dela via


PartyVoiceChatTranscriptionPhraseType

Types of transcription phrases.

Syntax

enum class PartyVoiceChatTranscriptionPhraseType    
{  
    Hypothesis = 0,  
    Final = 1,  
}  

Constants

Constant Description
Hypothesis The transcription is a hypothesis phrase.
Final The transcription is a final phrase.

Remarks

A Hypothesis phrase represents a snapshot into the transcription process and does not represent a stable accumulation of transcription. For example, a first speech hypothesis may contain the words "fine fun" and the second hypothesis may contain the words "find funny". Hypothesis messages are frequent and there can be many hypothesis messages associated with a particular phrase. Once a transcription of type Final is received, no more hypothesis messages associated with that phrase will be provided; new hypothesis phrases will represent a new logical phrase. Because each phrase is tied to a speaker, hypothesis messages for a phrase can be correlated by inspecting the speaker field of the PartyVoiceChatTranscriptionReceivedStateChange.

Hypothesis phrases can optionally be used to improve the user experience by improving perceived responsiveness. An example implementation might have a special text box for hypothesis messages that is frequently updated with the latest hypothesis transcription from each chat control. Once a non-hypothesis transcription is received, the transcription for the chat control would be removed from the hypothesis text box and rendered in a long-lived text box.

A Final phrase represents the end of the transcription process after the speaker has completed a sentence or phrase. Capitalization, punctuation, inverse text normalization, and profanity masking will have been applied to this transcription. For example, if a user speaks a phrase represented by the words "my flight to seattle leaves at six", the transcription will read "My flight to Seattle leaves at 6." Inverse text normalization is the process that converts the word "six" to the number "6". Profane words will be replaced by asterisks.

If the associated transcription represents the audio generated by a call to PartyLocalChatControl::SynthesizeTextToSpeech(), the transcription will match the text string used to generate the audio. No post-processing, such as capitalization and punctuation, will be applied to the text.

Requirements

Header: Party.h

See also

Party members
PartyLocalChatControl::SynthesizeTextToSpeech
PartyVoiceChatTranscriptionReceivedStateChange