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

# XSpeechSynthesizerCloseStreamHandle

> XSpeechSynthesizerCloseStreamHandle

# XSpeechSynthesizerCloseStreamHandle

Cierra la secuencia del sintetizador de voz y libera los recursos del sistema asignados.

## Sintaxis

```cpp theme={null}
HRESULT XSpeechSynthesizerCloseStreamHandle(  
         XSpeechSynthesizerStreamHandle speechSynthesisStream  
)  
```

### Parámetros

*speechSynthesisStream*   \_In\_\
Tipo: XSpeechSynthesizerStreamHandle

La secuencia de síntesis de voz que se cerrará.

### Valor devuelto

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

Devuelve **S\_OK** si se realiza correctamente; de lo contrario, devuelve un código de error. Para obtener una lista de códigos de error, consulte [Códigos de error](/reference/errorcodes).

## Comentarios

<Note>No es seguro llamar a esta función en un subproceso sensible al tiempo. Para obtener más información, consulte [Subprocesos sensibles al tiempo](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads).</Note>

Use esta función para cerrar una secuencia de sintetizador de voz creada mediante una llamada a la función [XSpeechSynthesizerCreateStreamFromText](/reference/system/xspeechsynthesizer/functions/xspeechsynthesizercreatestreamfromtext).

Para evitar pérdidas de memoria, llame a esta función para cerrar un identificador de secuencia de sintetizador de voz después de haber completado todas las operaciones que usan el identificador. Todas las operaciones asincrónicas pendientes deben completarse antes de llamar a esta función.

Para ver un ejemplo que muestra cómo usar la función **XSpeechSynthesizerCloseStreamHandle**, consulte [XSpeechSynthesizerCreate](/reference/system/xspeechsynthesizer/functions/xspeechsynthesizercreate).

## Requisitos

**Encabezado:** XSpeechSynthesizer.h

**Biblioteca:** xgameruntime.lib

**Plataformas compatibles:** Windows, consolas de la familia XBOX One y consolas XBOX Series

## Documentación conceptual

* [Texto a voz](/build/console-features/text-to-speech/text-to-speech)
* [Subprocesos sensibles al tiempo](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)

## Consulte también

[XAccessibility](/reference/system/xaccessibility/xaccessibility_members)\
[XSpeechSynthesizerCloseHandle](/reference/system/xspeechsynthesizer/functions/xspeechsynthesizerclosehandle)\
[XSpeechSynthesizer](/reference/system/xspeechsynthesizer/xspeechsynthesizer_members)


## Related topics

- [XSpeechSynthesizerCloseHandle](/es/reference/system/xspeechsynthesizer/functions/xspeechsynthesizerclosehandle.md)
- [XSpeechSynthesizerCreateStreamFromSsml](/es/reference/system/xspeechsynthesizer/functions/xspeechsynthesizercreatestreamfromssml.md)
- [XSpeechSynthesizerCreateStreamFromText](/es/reference/system/xspeechsynthesizer/functions/xspeechsynthesizercreatestreamfromtext.md)
- [XSpeechSynthesizer](/es/reference/system/xspeechsynthesizer/xspeechsynthesizer_members.md)
- [Texto a voz](/es/build/console-features/text-to-speech/text-to-speech.md)
