> This page is for Voice APIs.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://dev.hume.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://dev.hume.ai/_mcp/server.

# Audio Reconstruction

The audio reconstruction feature allows you to listen to past conversations by stitching together all audio snippets
from a Chat—including both user inputs and EVI’s responses—into a single audio file. This can be useful for reviewing
interactions, quality assurance, or integrating playback functionality into your application.

> **Warning**
>
> If [data retention is disabled](/docs/resources/privacy#zero-data-retention-and-data-usage-options),
> Chat history will not be recorded, and previous Chat data and audio reconstruction will not be retrievable.

### How audio reconstruction works

The audio reconstruction process combines individual audio clips into a continuous file. Here are some important
considerations:

* **Storage duration**: Reconstructed audio files are stored indefinitely.
* **Signed URL expiration**: The signed\_audio\_url expires after 60 minutes. If it expires before you download the
  file, you can generate a new URL by making another API request.
* **No merging of Chats**: The API does not support combining multiple Chats within a Chat Group into a single audio
  file.
* **Asynchronous process**: Audio reconstruction is performed in the background. The time required depends on the
  conversation’s length and system load.

### Audio reconstruction statuses

The status of an audio reconstruction request will indicate its progress:

* `QUEUED`: The reconstruction job is waiting to be processed.
* `IN_PROGRESS`: The reconstruction is currently being processed.
* `COMPLETE`: The audio reconstruction is finished and ready for download.
* `ERROR`: An error occurred during the reconstruction process.
* `CANCELED`: The reconstruction job has been canceled.

### Fetching reconstructed audio for a Chat

To fetch the reconstructed audio for a specific **Chat**, use the following endpoint: [/chats/\{chat\_id}/audio](/reference/speech-to-speech-evi/chats/get-audio).

#### cURL

```bash
# Replace {chat_id} with your Chat ID
# Ensure your API key is set in the HUME_API_KEY environment variable
curl -X GET "https://api.hume.ai/v0/evi/chats/{chat_id}/audio" \
    -H "X-Hume-Api-Key: $HUME_API_KEY" \
    -H "Accept: application/json"
```

#### TypeScript

```typescript
import { HumeClient } from "hume";

const client = new HumeClient({ apiKey: "<HUME_API_KEY>" });
await client.empathicVoice.chats.getAudio("<YOUR_CHAT_ID>");
```

#### Python

```python
from hume import HumeClient

client = HumeClient(api_key="<HUME_API_KEY>")
client.empathic_voice.chats.get_audio(id="<YOUR_CHAT_ID>")
```

**Example response (audio reconstruction initiated)**:

```json
// Sample response (audio reconstruction initiated)
{
  "id": "470a49f6-1dec-4afe-8b61-035d3b2d63b0",
  "user_id": "e6235940-cfda-3988-9147-ff531627cf42",
  "status": "QUEUED",
  "filename": null,
  "modified_at": 1729875432555,
  "signed_audio_url": null,
  "signed_url_expiration_timestamp_millis": null  
}
```

> **Info**
>
> If audio reconstruction for a **Chat** or **Chat Group** hasn’t already occurred, calling the respective endpoint
> will automatically add the audio reconstruction process to our job queue.

### Fetching reconstructed audio for a Chat Group

To fetch a paginated list of reconstructed audio for **Chats** within a **Chat Group**, use the following endpoint:
[/chat\_groups/\{chat\_group\_id}/audio](/reference/speech-to-speech-evi/chat-groups/get-audio).

#### cURL

```bash
# Replace {chat_group_id} with your Chat Group ID
# Include pagination parameters as needed
# Ensure your API key is set in the HUME_API_KEY environment variable
curl -X GET "https://api.hume.ai/v0/evi/chat_groups/{chat_group_id}/audio?page_number=1&page_size=10&ascending_order=false" \
    -H "X-Hume-Api-Key: $HUME_API_KEY" \
    -H "Accept: application/json"
```

#### TypeScript

```typescript
import { HumeClient } from "hume";

const client = new HumeClient({ apiKey: "<HUME_API_KEY>" });
await client.empathicVoice.chatGroups.getAudio("<YOUR_CHAT_ID>", {
    pageNumber: 0,
    pageSize: 10,
    ascendingOrder: false
});
```

#### Python

```python
from hume import HumeClient

client = HumeClient(
    api_key="HUME_API_KEY",
)
client.empathic_voice.chat_groups.get_audio(
    id="YOUR_CHAT_ID",
    page_number=0,
    page_size=10,
    ascending_order=False,
)
```

```json
// Sample response (audio reconstruction initiated)
{
  "id": "369846cf-6ad5-404d-905e-a8acb5cdfc78",
  "user_id": "e6235940-cfda-3988-9147-ff531627cf42",
  "num_chats": 1,
  "page_number": 0,
  "page_size": 10,
  "total_pages": 1,
  "pagination_direction": "DESC",
  "audio_reconstructions_page": [
    {
      "id": "470a49f6-1dec-4afe-8b61-035d3b2d63b0",
      "user_id": "e6235940-cfda-3988-9147-ff531627cf42",
      "status": "QUEUED",
      "filename": null,
      "modified_at": 1729875432555,
      "signed_audio_url": null,
      "signed_url_expiration_timestamp_millis": null  
    }
  ]
}
```

### Polling for completion

Since the reconstruction process is asynchronous, you can poll the endpoint to check the status field until it changes
to `COMPLETE`. Once the status is `COMPLETE`, the `signed_audio_url` and `signed_url_expiration` fields will be populated.

```json
// Sample response (reconstruction complete)
{
  "id": "470a49f6-1dec-4afe-8b61-035d3b2d63b0",
  "user_id": "e6235940-cfda-3988-9147-ff531627cf42",
  "status": "COMPLETE",
  "filename": "e6235940-cfda-3988-9147-ff531627cf42/470a49f6-1dec-4afe-8b61-035d3b2d63b0/reconstructed_audio.mp4",
  "modified_at": 1729875432555,
  "signed_audio_url": "https://storage.googleapis.com/...etc.",
  "signed_url_expiration_timestamp_millis": 1730232816964  
}
```

### Downloading the audio file

After the reconstruction is complete, you can download the audio file using the `signed_audio_url`. The following cURL
command saves the audio file using the original filename provided by the server:

```bash
# Replace {signed_audio_url} with the URL from the API response
curl -O "{signed_audio_url}"
```

---