PartyLocalChatControl::SynthesizeTextToSpeech

Generates text-to-speech audio that is used to either displace the microphone audio associated with this chat control or render directly to the chat control's audio output.

Syntax

PartyError SynthesizeTextToSpeech(  
    PartySynthesizeTextToSpeechType type,  
    PartyString textToSynthesize,  
    void* asyncIdentifier  
)  

Parameters

type   PartySynthesizeTextToSpeechType

The type of text-to-speech operation.

textToSynthesize   PartyString

The text from which to synthesize audio.

asyncIdentifier   void*
optional

An optional, app-defined, pointer-sized context value that can be used to associate the completion state change with this call.

Return value

PartyError

c_partyErrorSuccess if the asynchronous operation to synthesize the text to speech began, or an error code otherwise. If this method fails, no related state changes will be generated. The human-readable form of the error code can be retrieved via PartyManager::GetErrorMessage().

Remarks

SynthesizeTextToSpeech() cannot be called for a particular type until a text-to-speech profile has been configured for the specified type via SetTextToSpeechProfile().

SynthesizeTextToSpeech() can be called immediately after configuring a text-to-speech profile via a call to SetTextToSpeechProfile() with the same type. In such a case, the text-to-speech operation will be queued behind the completion of the SetTextToSpeechProfile() operation.

Requirements

Header: Party.h

See also

PartyLocalChatControl
PartyLocalChatControl::SetTextToSpeechProfile