XSpeechSynthesizerInstalledVoicesCallback

The client-implemented callback function that receives information about a voice when XSpeechSynthesizerEnumerateInstalledVoices is called.

Syntax

bool XSpeechSynthesizerInstalledVoicesCallback(  
         const XSpeechSynthesizerVoiceInformation* information,  
         void* context  
)  

Parameters

information   _In_
Type: XSpeechSynthesizerVoiceInformation*

A pointer to an XSpeechSynthesizerVoiceInformation structure that contains the details of the currently enumerated voice.

context   _In_
Type: void*

The context pointer that was provided in the initial call to XSpeechSynthesizerEnumerateInstalledVoices.

Return value

Type: bool

Returns true if XSpeechSynthesizerEnumerateInstalledVoices is to continue enumerating, and false if XSpeechSynthesizerEnumerateInstalledVoices is to stop enumerating.

Remarks

  • while the XSpeechSynthesizerInstalledVoicesCallback function returns true, the XSpeechSynthesizerInstalledVoicesCallback callback function is called by XSpeechSynthesizerEnumerateInstalledVoices once for each installed speech synthesis engine, or voice. If the XSpeechSynthesizerInstalledVoicesCallback function returns false, XSpeechSynthesizerEnumerateInstalledVoices stops enumerating over any remaining installed voices.

  • To identify and display information about each voice installed on the current device, use the data provided by the XSpeechSynthesizerVoiceInformation structure in information.

  • For an example that demonstrates how to use the XSpeechSynthesizerInstalledVoicesCallback callback function, see XSpeechSynthesizerEnumerateInstalledVoices.

Requirements

Header: XSpeechSynthesizer.h

Library: xgameruntime.lib

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

See also

XAccessibility
XSpeechSynthesizerSetCustomVoice
XSpeechSynthesizer