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

# 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](/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>

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

* 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](/pt-BR/reference/system/xspeechsynthesizer/functions/xspeechsynthesizercreate).

## 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)\
[XSpeechSynthesizerCreate](/pt-BR/reference/system/xspeechsynthesizer/functions/xspeechsynthesizercreate)\
[XSpeechSynthesizerCloseStreamHandle](/pt-BR/reference/system/xspeechsynthesizer/functions/xspeechsynthesizerclosestreamhandle)\
[XSpeechSynthesizer](/pt-BR/reference/system/xspeechsynthesizer/xspeechsynthesizer_members)


## Related topics

- [XSpeechSynthesizerCloseHandle](/reference/system/xspeechsynthesizer/functions/xspeechsynthesizerclosehandle.md)
- [XSpeechSynthesizerCloseStreamHandle](/reference/system/xspeechsynthesizer/functions/xspeechsynthesizerclosestreamhandle.md)
