> ## Documentation Index
> Fetch the complete documentation index at: https://dripart-comfy-docs-comfyapi-search.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# VAEEncodeAudio - ComfyUI Built-in Node Documentation

> The VAE Encode Audio node converts audio data into a latent representation using a Variational Autoencoder (VAE).

The VAE Encode Audio node converts audio data into a latent representation using a Variational Autoencoder (VAE). It processes the incoming audio through the VAE to produce compressed latent samples that can be used for further audio generation or manipulation tasks. If the audio's sample rate differs from the VAE's expected sample rate, the audio is automatically resampled before encoding.

## Inputs

| Parameter | Description                                                                  | Data Type | Required | Range |
| --------- | ---------------------------------------------------------------------------- | --------- | -------- | ----- |
| `audio`   | The audio data to encode, containing waveform and sample rate information    | AUDIO     | Yes      | -     |
| `vae`     | The Variational Autoencoder model used to encode the audio into latent space | VAE       | Yes      | -     |

**Note:** The audio input is automatically resampled to match the VAE's expected sample rate (default: 44100 Hz) if the original sample rate differs from this value. If the input audio is None (for example, when the source video has no audio track), the node will raise an error.

## Outputs

| Output Name | Description                                                                     | Data Type |
| ----------- | ------------------------------------------------------------------------------- | --------- |
| `LATENT`    | The encoded audio representation in latent space, containing compressed samples | LATENT    |

> This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! [Edit on GitHub](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/VAEEncodeAudio/en.md)

***

**Source fingerprint (SHA-256):** `224563af40a377a37209b26ec8becf035560da273b18293634f684e18c5e63ed`
