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

# XSpeechSynthesizerInstalledVoicesCallback

> XSpeechSynthesizerInstalledVoicesCallback

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

## Syntax

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

### Parameters

*information*   \_In\_\
Type: [XSpeechSynthesizerVoiceInformation\*](https://docs.xbox.com/reference/system/xspeechsynthesizer/structs/xspeechsynthesizervoiceinformation.md)

A pointer to an [XSpeechSynthesizerVoiceInformation](https://docs.xbox.com/reference/system/xspeechsynthesizer/structs/xspeechsynthesizervoiceinformation.md) 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](https://docs.xbox.com/reference/system/xspeechsynthesizer/functions/xspeechsynthesizerenumerateinstalledvoices.md).

### Return value

Type: bool

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

## Remarks

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

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

## Requirements

**Header:** XSpeechSynthesizer.h

**Library:** xgameruntime.lib

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

## See also

[XAccessibility](https://docs.xbox.com/reference/system/xaccessibility/xaccessibility_members.md)\
[XSpeechSynthesizerSetCustomVoice](https://docs.xbox.com/reference/system/xspeechsynthesizer/functions/xspeechsynthesizersetcustomvoice.md)\
[XSpeechSynthesizer](https://docs.xbox.com/reference/system/xspeechsynthesizer/xspeechsynthesizer_members.md)


## Related topics

- [XSpeechSynthesizerEnumerateInstalledVoices](https://docs.xbox.com/reference/system/xspeechsynthesizer/functions/xspeechsynthesizerenumerateinstalledvoices.md)
- [XSpeechSynthesizerVoiceGender](https://docs.xbox.com/reference/system/xspeechsynthesizer/enums/xspeechsynthesizervoicegender.md)
- [XSpeechSynthesizerSetDefaultVoice](https://docs.xbox.com/reference/system/xspeechsynthesizer/functions/xspeechsynthesizersetdefaultvoice.md)
- [XSpeechSynthesizerSetCustomVoice](https://docs.xbox.com/reference/system/xspeechsynthesizer/functions/xspeechsynthesizersetcustomvoice.md)
- [XSpeechSynthesizer (API contents)](https://docs.xbox.com/reference/system/xspeechsynthesizer/xspeechsynthesizer_members.md)
