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

Obtém o tamanho do buffer de dados de um fluxo de síntese de fala.

## Sintaxe

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

### Parâmetros

*speechSynthesisStream*   \_In\_\
Tipo: XSpeechSynthesizerStreamHandle

O fluxo de sintetizador de fala que contém os dados do fluxo.

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

O tamanho do buffer de dados do fluxo, em bytes.

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

* Use esta função para determinar o tamanho do buffer necessário para recuperar os dados de áudio da fala sintetizada, do buffer de dados de um fluxo de sintetizador de fala criado chamando a função [XSpeechSynthesizerCreateStreamFromText](/pt-BR/reference/system/xspeechsynthesizer/functions/xspeechsynthesizercreatestreamfromtext). O tamanho máximo de dados do buffer é 0xffffffff bytes: quatro gigabytes menos um byte.

* Para recuperar os dados de áudio de um fluxo de sintetizador de fala, use o valor desta função para definir o valor do parâmetro *bufferSize* da função [XSpeechSynthesizerGetStreamData](/pt-BR/reference/system/xspeechsynthesizer/functions/xspeechsynthesizergetstreamdata).

* Para obter um exemplo que demonstra como usar a função **XSpeechSynthesizerGetStreamDataSize**, 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

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


## Related topics

- [XSpeechSynthesizerGetStreamDataSize](/reference/system/xspeechsynthesizer/functions/xspeechsynthesizergetstreamdatasize.md)
- [XSpeechSynthesizerGetStreamData](/ja-jp/reference/system/xspeechsynthesizer/functions/xspeechsynthesizergetstreamdata.md)
