> ## 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.

# XSpeechSynthesizerSetDefaultVoice

> XSpeechSynthesizerSetDefaultVoice

# XSpeechSynthesizerSetDefaultVoice

Especifica que o sintetizador de fala deve usar a voz padrão do sistema.

## Sintaxe

```cpp theme={null}
HRESULT XSpeechSynthesizerSetDefaultVoice(  
         XSpeechSynthesizerHandle speechSynthesizer  
)  
```

### Parâmetros

*speechSynthesizer*   \_In\_\
Tipo: XSpeechSynthesizerHandle

Especifica o sintetizador de fala que usará a voz padrão.

### Valor retornado

Tipo: [HRESULT](https://learn.microsoft.com/openspecs/windows_protocols/ms-erref/0642cb2f-2075-4469-918c-4441e69c548a)

Retornará **S\_OK** se for bem-sucedido; caso contrário, retornará um código de erro. Para obter uma lista de códigos de erro, consulte [Códigos de erro](https://docs.xbox.com/pt-BR/reference/errorcodes.md).

## Comentários

> [!NOTE]
>
> Não é seguro chamar esta função em um thread sensível ao tempo. Para obter mais informações, consulte [Threads sensíveis ao tempo](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads).

* Para usar uma voz instalada diferente para o sintetizador de fala especificado, chame [XSpeechSynthesizerSetCustomVoice](https://docs.xbox.com/pt-BR/reference/system/xspeechsynthesizer/functions/xspeechsynthesizersetcustomvoice.md).

* Para enumerar e obter informações sobre as vozes instaladas no dispositivo atual, use a função [XSpeechSynthesizerEnumerateInstalledVoices](https://docs.xbox.com/pt-BR/reference/system/xspeechsynthesizer/functions/xspeechsynthesizerenumerateinstalledvoices.md) junto com a função de retorno de chamada [XSpeechSynthesizerInstalledVoicesCallback](https://docs.xbox.com/pt-BR/reference/system/xspeechsynthesizer/functions/xspeechsynthesizerinstalledvoicescallback.md).

* Para cada voz instalada, a estrutura [XSpeechSynthesizerVoiceInformation](https://docs.xbox.com/pt-BR/reference/system/xspeechsynthesizer/structs/xspeechsynthesizervoiceinformation.md) fornece a ID da voz, a descrição, o texto de exibição, o gênero, o idioma e outras informações.

## Requisitos

**Cabeçalho:** XSpeechSynthesizer.h

**Biblioteca:** xgameruntime.lib

**Plataformas com suporte:** Windows, consoles da família XBOX One e consoles XBOX Series

## Documentação conceitual

* [Conversão de texto em fala](https://docs.xbox.com/pt-BR/build/console-features/text-to-speech/text-to-speech.md)
* [Threads sensíveis ao tempo](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)

## Confira também

[XAccessibility](https://docs.xbox.com/pt-BR/reference/system/xaccessibility/xaccessibility_members.md)\
[XSpeechSynthesizerCreateStreamFromText](https://docs.xbox.com/pt-BR/reference/system/xspeechsynthesizer/functions/xspeechsynthesizercreatestreamfromtext.md)\
[XSpeechSynthesizer](https://docs.xbox.com/pt-BR/reference/system/xspeechsynthesizer/xspeechsynthesizer_members.md)


## Related topics

- [XSpeechSynthesizerSetCustomVoice](https://docs.xbox.com/pt-BR/reference/system/xspeechsynthesizer/functions/xspeechsynthesizersetcustomvoice.md)
- [Conversão de texto em fala](https://docs.xbox.com/pt-BR/build/console-features/text-to-speech/text-to-speech.md)
- [XSpeechSynthesizer (conteúdo da API)](https://docs.xbox.com/pt-BR/reference/system/xspeechsynthesizer/xspeechsynthesizer_members.md)
- [XSpeechSynthesizerCreate](https://docs.xbox.com/pt-BR/reference/system/xspeechsynthesizer/functions/xspeechsynthesizercreate.md)
- [Usar wrappers C# para APIs do GDK no seu projeto do Unity](https://docs.xbox.com/pt-BR/build/gdk-and-engines/unity/unity-api-wrappers.md)
