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

# Voice Conversion (Streamed JSON)

POST https://api.hume.ai/v0/tts/voice_conversion/json
Content-Type: multipart/form-data

Reference: https://dev.hume.ai/voice/reference/text-to-speech-tts/convert-voice-json

## Authentication

- `X-Hume-Api-Key` header (required) — API Key authentication via header

## Request

### Body (multipart/form-data)

This endpoint expects a multipart form containing an optional file.

- `strip_headers` (boolean, optional) — If enabled, the audio for all the chunks of a generation, once concatenated together, will constitute a single audio file. Otherwise, if disabled, each chunk's audio will be its own audio file, each with its own headers (if applicable).
- `audio` (file, optional) — Audio file containing speech to be converted to the target voice. Supported formats include `MP3`, `WAV`, `M4A`, and `OGG`.
- `context` (V0TtsVoiceConversionJsonPostRequestBodyContentMultipartFormDataSchemaContext, optional) — Utterances to use as context for generating consistent speech style and prosody across multiple requests. These will not be converted to speech output.
- `voice` (VoiceRef, optional)
- `format` (Format, optional) — Specifies the output audio file format.
- `include_timestamp_types` (list of enum, optional) — The set of timestamp types to include in the response. When used in multipart/form-data, specify each value using bracket notation: `include_timestamp_types[0]=word&include_timestamp_types[1]=phoneme`. Only supported for Octave 2 requests.

## Response

### 200

Successful Response

- Streaming response of `TtsOutput`.
- `type`: `audio` (SnippetAudioChunk)
  - `audio` (string, required) — The generated audio output chunk in the requested format.
  - `audio_format` (enum, required) — The generated audio output format.
    - Allowed values: `mp3`, `pcm`, `wav`
  - `chunk_index` (integer, required) — The index of the audio chunk in the snippet.
  - `generation_id` (string, required) — The generation ID of the parent snippet that this chunk corresponds to.
  - `is_last_chunk` (boolean, required) — Whether or not this is the last chunk streamed back from the decoder for one input snippet.
  - `request_id` (string, required) — ID of the initiating request.
  - `snippet_id` (string, required) — The ID of the parent snippet that this chunk corresponds to.
  - `text` (string, required) — The text of the parent snippet that this chunk corresponds to.
  - `transcribed_text` (string, required, nullable) — The transcribed text of the generated audio of the parent snippet that this chunk corresponds to. It is only present if `instant_mode` is set to `false`.
  - `utterance_index` (integer, required, nullable) — The index of the utterance in the request that the parent snippet of this chunk corresponds to.
  - `snippet` (Snippet-Output, optional)
- `type`: `timestamp` (OctaveOutputTimestamp)
  - `generation_id` (string, required) — The generation ID of the parent snippet that this chunk corresponds to.
  - `request_id` (string, required) — ID of the initiating request.
  - `snippet_id` (string, required) — The ID of the parent snippet that this chunk corresponds to.
  - `timestamp` (Timestamp, required) — A word or phoneme level timestamp for the generated audio.

## Errors

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### Snippet-Output

- `audio` (string, required) — The segmented audio output in the requested format, encoded as a base64 string.
- `generation_id` (string, required) — The generation ID this snippet corresponds to.
- `id` (string, required) — A unique ID associated with this **Snippet**.
- `text` (string, required) — The text for this **Snippet**.
- `timestamps` (list of Timestamp, required) — A list of word or phoneme level timestamps for the generated audio. Timestamps are only returned for Octave 2 requests.
- `transcribed_text` (string, required, nullable) — The transcribed text of the generated audio. It is only present if `instant_mode` is set to `false`.
- `utterance_index` (integer, required, nullable) — The index of the utterance in the request this snippet corresponds to.

### Timestamp

- `text` (string, required) — The word or phoneme text that the timestamp corresponds to.
- `time` (MillisecondInterval, required) — The start and end timestamps for the word or phoneme in milliseconds.
- `type` (enum, required)
  - Allowed values: `word`, `phoneme`

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)

### MillisecondInterval

- `begin` (integer, required) — Start time of the interval in milliseconds.
- `end` (integer, required) — End time of the interval in milliseconds.

### ValidationErrorLocItems

## Examples

**Request**

```json
{
  "audio": "<file: speech_sample.wav>"
}
```

**Response**

```json
[
  {
    "generation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "request_id": "7b9c9f1e-8d3a-4f2a-9f3e-1a2b3c4d5e6f",
    "snippet_id": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
    "timestamp": {
      "text": "Hello",
      "time": {
        "begin": 0,
        "end": 500
      },
      "type": "word"
    },
    "type": "timestamp"
  }
]
```