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

# 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](/pt-BR/reference/errorcodes).

## 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).</Note>

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

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

* Para cada voz instalada, a estrutura [XSpeechSynthesizerVoiceInformation](/pt-BR/reference/system/xspeechsynthesizer/structs/xspeechsynthesizervoiceinformation) 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](/pt-BR/build/console-features/text-to-speech/text-to-speech)
* [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](/pt-BR/reference/system/xaccessibility/xaccessibility_members)\
[XSpeechSynthesizerCreateStreamFromText](/pt-BR/reference/system/xspeechsynthesizer/functions/xspeechsynthesizercreatestreamfromtext)\
[XSpeechSynthesizer](/pt-BR/reference/system/xspeechsynthesizer/xspeechsynthesizer_members)


## Related topics

- [XSpeechSynthesizerSetDefaultVoice](/reference/system/xspeechsynthesizer/functions/xspeechsynthesizersetdefaultvoice.md)
- [XSpeechSynthesizerSetCustomVoice](/reference/system/xspeechsynthesizer/functions/xspeechsynthesizersetcustomvoice.md)
- [XSpeechSynthesizer](/reference/system/xspeechsynthesizer/xspeechsynthesizer_members.md)
