> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XSpeechSynthesizerInstalledVoicesCallback

> XSpeechSynthesizerInstalledVoicesCallback

# XSpeechSynthesizerInstalledVoicesCallback

The client-implemented callback function that receives information about a voice when [XSpeechSynthesizerEnumerateInstalledVoices](/reference/system/xspeechsynthesizer/functions/xspeechsynthesizerenumerateinstalledvoices) is called.

## Syntax

```cpp theme={null}
bool XSpeechSynthesizerInstalledVoicesCallback(  
         const XSpeechSynthesizerVoiceInformation* information,  
         void* context  
)  
```

### Parameters

*information*   \_In\_\
Type: [XSpeechSynthesizerVoiceInformation\*](/reference/system/xspeechsynthesizer/structs/xspeechsynthesizervoiceinformation)

A pointer to an [XSpeechSynthesizerVoiceInformation](/reference/system/xspeechsynthesizer/structs/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](/reference/system/xspeechsynthesizer/functions/xspeechsynthesizerenumerateinstalledvoices).

### Return value

Type: bool

Returns **true** if [XSpeechSynthesizerEnumerateInstalledVoices](/reference/system/xspeechsynthesizer/functions/xspeechsynthesizerenumerateinstalledvoices) is to continue enumerating, and **false** if [XSpeechSynthesizerEnumerateInstalledVoices](/reference/system/xspeechsynthesizer/functions/xspeechsynthesizerenumerateinstalledvoices) is to stop enumerating.

## Remarks

* while the **XSpeechSynthesizerInstalledVoicesCallback** function returns **true**, the **XSpeechSynthesizerInstalledVoicesCallback** callback function is called by [XSpeechSynthesizerEnumerateInstalledVoices](/reference/system/xspeechsynthesizer/functions/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](/reference/system/xspeechsynthesizer/structs/xspeechsynthesizervoiceinformation) structure in *information*.

* For an example that demonstrates how to use the **XSpeechSynthesizerInstalledVoicesCallback** callback function, see [XSpeechSynthesizerEnumerateInstalledVoices](/reference/system/xspeechsynthesizer/functions/xspeechsynthesizerenumerateinstalledvoices).

## Requirements

**Header:** XSpeechSynthesizer.h

**Library:** xgameruntime.lib

**Supported platforms:** Windows, XBOX One family consoles and XBOX Series consoles

## See also

[XAccessibility](/reference/system/xaccessibility/xaccessibility_members)\
[XSpeechSynthesizerSetCustomVoice](/reference/system/xspeechsynthesizer/functions/xspeechsynthesizersetcustomvoice)\
[XSpeechSynthesizer](/reference/system/xspeechsynthesizer/xspeechsynthesizer_members)


## Related topics

- [XSpeechSynthesizerEnumerateInstalledVoices](/reference/system/xspeechsynthesizer/functions/xspeechsynthesizerenumerateinstalledvoices.md)
- [XSpeechSynthesizerVoiceGender](/reference/system/xspeechsynthesizer/enums/xspeechsynthesizervoicegender.md)
- [XSpeechSynthesizerSetDefaultVoice](/reference/system/xspeechsynthesizer/functions/xspeechsynthesizersetdefaultvoice.md)
- [XSpeechSynthesizer](/reference/system/xspeechsynthesizer/xspeechsynthesizer_members.md)
- [XSpeechSynthesizerSetCustomVoice](/reference/system/xspeechsynthesizer/functions/xspeechsynthesizersetcustomvoice.md)
