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

# Voice Changer

Transform voice recordings into high-quality, lifelike AI voices using Murf’s Voice Changer. With just a few parameters, you can change the speaker’s voice, adjust pitch and speed, insert custom pauses—all while preserving the original speaker’s rhythm, tone, and accent automatically.

Try this capability in the [API Reference](/api/docs/api-reference/voice-changer/convert) Playground. Simply [generate your API key](https://murf.ai/api/dashboard) and start exploring the API.

## Quickstart

You can [Generate your API key](https://murf.ai/api/dashboard?utm_source=murf_api_docs) from the Murf API Dashboard and optionally set it as an environment variable.

#### Install the SDK

If you're using Python, you can install Murf's Python SDK using the following command:

```bash
pip install murf
```

#### Using the Voice Changer API

**`Python SDK`**

```python title="Python SDK"
from murf import Murf

client = Murf(
    api_key="YOUR_API_KEY", # Not required if you have set the MURF_API_KEY environment variable
)

file_path = "PATH_TO_YOUR_FILE" # Path to the file you want to use

response = client.voice_changer.convert(
  voice_id="Terrell",
  file=open(file_path, "rb"),
  # file_url="URL_TO_YOUR_FILE", # Optional: Use `file_url` instead of `file` if you want to use a publicly accessible file
)

print(response.audio_file)

```

```js
import fs from "fs";
import FormData from "form-data";
import axios from "axios";

async function convertVoice() {
  const filePath = "PATH_TO_YOUR_FILE";

  const url = "https://api.murf.ai/v1/voice-changer/convert";
  const form = new FormData();

  // Read the file as a stream and append it to the form
  const fileStream = fs.createReadStream(filePath);
  form.append("file", fileStream, "hello_world.mp3"); // Add file name explicitly
  form.append("voice_id", "Terrell");

  try {
    const response = await axios.post(url, form, {
      headers: {
        "api-key": "YOUR_API_KEY",
      },
    });
    console.log(response.data);
  } catch (error) {
    console.error(error.response ? error.response.data : error.message);
  }
}

convertVoice();
```

```curl
curl -X POST https://api.murf.ai/v1/voice-changer/convert \
     -H "api-key: YOUR_API_KEY" \
     -H "Content-Type: multipart/form-data" \
     -F file=@<file1> \
     -F voice_id="Terrell"
```

A link to the audio file will be returned in the response. You can use this link to download the audio file and use it wherever you need it. The audio file will be available for download for 24 hours after generation.

### Response (200)

```json
{
  "audio_file": "https://murf.ai/link/to/audio/file",
  "audio_length_in_seconds": 8.75,
  "remaining_character_count": 992150,
  "encoded_audio": "UklGRlpHSEFWA..."
}
```

## Speech Customization

The Voice Changer endpoint offers powerful speech transformation capabilities, supporting key features like [voiceId](/api/docs/text-to-speech/speech-customization#voices), [pitch](/api/docs/text-to-speech/speech-customization#pitch), [speed](/api/docs/text-to-speech/speech-customization#speed), and [pauses](/api/docs/text-to-speech/speech-customization#pauses).

The maximum allowed input length is 3 minutes per request.

## FAQ

#### What are the supported input formats?

The API accepts the following input audio formats: WAV, MP3, ALAW, ULAW,
FLAC.

#### What are the supported output formats?

Our system supports the following output formats: WAV (Default), MP3, FLAC,
ALAW, and ULAW. The Voice Changer endpoint offers the same range of sample
rates and channel types as the Speech Synthesis endpoint, allowing users to
optimize output quality based on their specific needs.

#### What is the input file limit?

The maximum input length is 3 minutes. Files longer than this will be
rejected.

#### Does the Voice Changer preserve how something is said?

Yes. The system automatically retains the original speaker's prosody and
accent—meaning their rhythm, tone, pacing, and regional speech patterns are
preserved in the transformed voice for natural-sounding results. These are
always enabled by default and do not need to be configured manually.