XSpeechSynthesizerSetDefaultVoice
Specifies that the speech synthesizer is to use the system's default voice.
Syntax
HRESULT XSpeechSynthesizerSetDefaultVoice(
XSpeechSynthesizerHandle speechSynthesizer
)
Parameters
speechSynthesizer _In_
Type: XSpeechSynthesizerHandle
Specifies the speech synthesizer that will be using the default voice.
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.
To use a different installed voice for the specified speech synthesizer, call XSpeechSynthesizerSetCustomVoice.
To enumerate over and get information about the voices installed on the current device, use the XSpeechSynthesizerEnumerateInstalledVoices function along with the XSpeechSynthesizerInstalledVoicesCallback callback function.
For each installed voice, the XSpeechSynthesizerVoiceInformation structure provides the voice ID, description, display text, gender, language, and other information.
Requirements
Header: XSpeechSynthesizer.h
Library: xgameruntime.lib
Supported platforms: Windows, Xbox One family consoles and Xbox Series consoles
See also
XAccessibility
XSpeechSynthesizerCreateStreamFromText
XSpeechSynthesizer