XSpeechSynthesizerSetCustomVoice
Specifies that the speech synthesizer is to use the specified custom voice.Syntax
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
This function isn’t safe to call on a time-sensitive thread. For more information, see Time-sensitive threads.
- For each installed voice, the XSpeechSynthesizerVoiceInformation structure provides the voice ID, description, display text, gender, language, and other information.
- To enumerate over and get information about the voices installed on the current device, use the XSpeechSynthesizerEnumerateInstalledVoices function along with the XSpeechSynthesizerInstalledVoicesCallback callback function.
- To use the current system voice for the specified speech synthesizer, call XSpeechSynthesizerSetDefaultVoice.
- For an example that demonstrates how to use the XSpeechSynthesizerSetCustomVoice function, see XSpeechSynthesizerCreate.
Requirements
Header: XSpeechSynthesizer.h Library: xgameruntime.lib Supported platforms: Windows, XBOX One family consoles and XBOX Series consolesConceptual documentation
See also
XAccessibilityXSpeechSynthesizerCreateStreamFromText
XSpeechSynthesizer
