chat_user_local::synthesize_text_to_speech

Synthesizes the text message as audio and generates audio packets as if the audio came from the local user's microphone.

Syntax

void synthesize_text_to_speech(  
    PCWSTR message  
)  

Parameters

message   _In_
Type: PCWSTR

The message for which audio should be synthesized.

Return value

Type: void

None.

Remarks

This method synthesizes the text message specified in message as audio, generating packets as if the audio came from the local user's microphone. For more information about text-to-speech, see Using the Game Chat 2 C++ API.

Note

This method should be called only if the local user has enabled text-to-speech. If the local user has not enabled text-to-speech, this call has no effect. Use the chat_user_local::speech_to_text_conversion_preference_enabled method to confirm that text-to-speech is enabled.

Requirements

Header: GameChat2.h

Supported platforms: Windows, Xbox One family consoles and Xbox Series consoles

See also

Intro to Game Chat 2
chat_user_local