XSpeechSynthesizerSetCustomVoice

Specifies that the speech synthesizer is to use the specified custom voice.

Syntax

HRESULT XSpeechSynthesizerSetCustomVoice(  
         XSpeechSynthesizerHandle speechSynthesizer,  
         const char* voiceId  
)  

Parameters

speechSynthesizer   _In_
Type: XSpeechSynthesizerHandle

Specifies the speech synthesizer that will be using the custom voice.

voiceId   _In_z_
Type: char*

A voice ID in an XSpeechSynthesizerVoiceInformation structure, returned in the XSpeechSynthesizerInstalledVoicesCallback function.

Return value

Type: HRESULT

Returns S_OK if successful; otherwise, returns an error code. For a list of error codes, see Error Codes.

Remarks

Note

This function isn't safe to call on a time-sensitive thread. For more information, see Time-sensitive threads.

Requirements

Header: XSpeechSynthesizer.h

Library: xgameruntime.lib

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

See also

XAccessibility
XSpeechSynthesizerCreateStreamFromText
XSpeechSynthesizer