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

# XSpeechSynthesizerGetStreamDataSize

> XSpeechSynthesizerGetStreamDataSize

# XSpeechSynthesizerGetStreamDataSize

Obtiene el tamaño del búfer de datos de una secuencia de síntesis de voz.

## Sintaxis

```cpp theme={null}
HRESULT XSpeechSynthesizerGetStreamDataSize(  
         XSpeechSynthesizerStreamHandle speechSynthesisStream,  
         size_t* bufferSize  
)  
```

### Parámetros

*speechSynthesisStream*   \_In\_\
Tipo: XSpeechSynthesizerStreamHandle

La secuencia de sintetizador de voz que contiene los datos de la secuencia.

*bufferSize*   \_Out\_\
Tipo: size\_t\*

El tamaño del búfer de datos de la secuencia, en bytes.

### Valor devuelto

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

Devuelve **S\_OK** si se ejecuta 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 determinar el tamaño del búfer necesario para recuperar los datos de audio de la voz sintetizada, desde el búfer de datos de una secuencia de sintetizador de voz creada mediante una llamada a la función [XSpeechSynthesizerCreateStreamFromText](/reference/system/xspeechsynthesizer/functions/xspeechsynthesizercreatestreamfromtext). El tamaño máximo de datos del búfer es de 0xffffffff bytes: cuatro gigabytes menos un byte.

* Para recuperar los datos de audio de una secuencia de sintetizador de voz, use el valor de esta función para establecer el valor del parámetro *bufferSize* de la función [XSpeechSynthesizerGetStreamData](/reference/system/xspeechsynthesizer/functions/xspeechsynthesizergetstreamdata).

* Para ver un ejemplo que muestra cómo usar la función **XSpeechSynthesizerGetStreamDataSize**, 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

[XSpeechSynthesizerCreateStreamFromText](/reference/system/xspeechsynthesizer/functions/xspeechsynthesizercreatestreamfromtext)\
[XSpeechSynthesizerGetStreamData](/reference/system/xspeechsynthesizer/functions/xspeechsynthesizergetstreamdata)\
[XSpeechSynthesizer](/reference/system/xspeechsynthesizer/xspeechsynthesizer_members)


## Related topics

- [XSpeechSynthesizerGetStreamData](/es/reference/system/xspeechsynthesizer/functions/xspeechsynthesizergetstreamdata.md)
- [XSpeechSynthesizer](/es/reference/system/xspeechsynthesizer/xspeechsynthesizer_members.md)
- [Texto a voz](/es/build/console-features/text-to-speech/text-to-speech.md)
- [XSpeechSynthesizerCreate](/es/reference/system/xspeechsynthesizer/functions/xspeechsynthesizercreate.md)
- [XSpeechSynthesizerCreateStreamFromSsml](/es/reference/system/xspeechsynthesizer/functions/xspeechsynthesizercreatestreamfromssml.md)
