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

# XSpeechSynthesizerCloseHandle

> XSpeechSynthesizerCloseHandle

# XSpeechSynthesizerCloseHandle

Fecha o sintetizador de fala e libera os recursos do sistema alocados.

## Sintaxe

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

### Parâmetros

*speechSynthesizer*   \_In\_opt\_\
Tipo: XSpeechSynthesizerHandle

O sintetizador de fala a ser fechado.

### Valor retornado

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

Retorna **S\_OK** se for bem-sucedida; caso contrário, retorna 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).

* Use esta função para fechar um sintetizador de fala criado chamando a função [XSpeechSynthesizerCreate](https://docs.xbox.com/pt-BR/reference/system/xspeechsynthesizer/functions/xspeechsynthesizercreate.md).

* Para evitar vazamentos de memória, chame esta função para fechar um identificador de sintetizador de fala depois de concluir todas as operações que estão usando o identificador.

* Para obter um exemplo que demonstra como usar a função **XSpeechSynthesizerCloseHandle**, consulte [XSpeechSynthesizerCreate](https://docs.xbox.com/pt-BR/reference/system/xspeechsynthesizer/functions/xspeechsynthesizercreate.md).

## 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)\
[XSpeechSynthesizerCreate](https://docs.xbox.com/pt-BR/reference/system/xspeechsynthesizer/functions/xspeechsynthesizercreate.md)\
[XSpeechSynthesizerCloseStreamHandle](https://docs.xbox.com/pt-BR/reference/system/xspeechsynthesizer/functions/xspeechsynthesizerclosestreamhandle.md)\
[XSpeechSynthesizer](https://docs.xbox.com/pt-BR/reference/system/xspeechsynthesizer/xspeechsynthesizer_members.md)


## Related topics

- [XSpeechSynthesizerCloseStreamHandle](https://docs.xbox.com/pt-BR/reference/system/xspeechsynthesizer/functions/xspeechsynthesizerclosestreamhandle.md)
- [XSpeechSynthesizerCreate](https://docs.xbox.com/pt-BR/reference/system/xspeechsynthesizer/functions/xspeechsynthesizercreate.md)
- [XSpeechSynthesizer (conteúdo da API)](https://docs.xbox.com/pt-BR/reference/system/xspeechsynthesizer/xspeechsynthesizer_members.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)
- [XSpeechSynthesizerCreateStreamFromSsml](https://docs.xbox.com/pt-BR/reference/system/xspeechsynthesizer/functions/xspeechsynthesizercreatestreamfromssml.md)
