Apidog

All-in-one Collaborative API Development Platform

API Design

API Documentation

API Debugging

API Mocking

API Automated Testing

How to Clone a Voice Using MiniMax's T2A-01-HD API

MiniMaxi API's fast voice cloning feature provides an efficient and straightforward way to replicate voices for various applications. By following a simple process, users can upload an audio file, clone the voice, and utilize it for speech synthesis.

Emmanuel Mumba

Emmanuel Mumba

Updated on January 30, 2025

MiniMax proudly introduces T2A-01-HD, a groundbreaking advancement in Text-to-Audio (T2A) technology and voice cloning capabilities. This revolutionary model sets new industry standards by offering unparalleled versatility in voice synthesis, emotional depth, and multilingual support. Whether you need voice cloning for business applications, creative projects, or multilingual communication, T2A-01-HD delivers high-fidelity, natural-sounding results.

Key Features of T2A-01-HD

Multi-Voice: Advanced Voice Synthesis and Cloning

T2A-01-HD can generate a high-quality synthetic voice from just 10 seconds of audio input. It captures voice characteristics, speech patterns, and emotional nuances, making it ideal for applications ranging from automated customer service to AI-generated narration.

Key capabilities include:

  • 300+ Pre-Built Voices: Covering multiple languages, accents, genders, and ages.
  • Custom Voice Cloning: Clone unique voices with high precision.
  • Advanced Control: Modify pitch, speed, and expression for customized output.
  • Professional Effects: Add room acoustics, telephone filters, and other enhancements.

Multi-Emotion: AI-Powered Emotional Intelligence

Unlike traditional TTS models, T2A-01-HD can identify and replicate emotional nuances in speech. Users can let the system detect emotions automatically or specify them for more expressive output, ensuring a truly human-like experience.

Multi-Language: Authentic Voice Cloning Across 17+ Languages

T2A-01-HD supports voice cloning in multiple languages, including:

  • English (US, UK, Australia, India)
  • Mandarin, Cantonese, Japanese, Korean, Vietnamese, Indonesian
  • French, German, Spanish, Italian, Dutch, Russian, Ukrainian
  • Portuguese (Brazilian), Turkish, Arabic

With superior fidelity compared to previous models, T2A-01-HD enables seamless communication across languages while preserving natural accents.

How to Clone a Voice with MiniMax's API

MiniMax provides a simple yet powerful API to enable quick voice cloning. Below is a step-by-step guide on how to use the T2A-01-HD API for voice cloning.

Quick Voice Cloning

To create a cloned voice, you first need to upload an audio file. This file should be in MP3, M4A, or WAV format, with a duration of 10 seconds to 5 minutes and a size under 20MB.

Operation Flow

  1. Upload an Audio File: Use the file upload interface to submit your audio file and retrieve a file_id.
  2. Clone the Voice: Call the Voice Clone API with the file_id and assign a custom voice_id.
  3. Use the Cloned Voice: Utilize the voice_id within the T2A v2 API to generate speech synthesis output.

Uploading an Audio File

To begin, upload an audio file using the File Upload API. This step is essential for obtaining a file_id, which is required for cloning the voice.

Endpoint:
https://api.minimaxi.chat/v1/files/upload

Required Parameters:

  • Authorization: Your API key
  • Content-Type: multipart/form-data
  • purpose: voice_clone
  • file: The audio file (MP3, M4A, WAV)

API Request Example (Python):

import json
import requests

group_id = 'your_group_id'  # Replace with your group ID
api_key = 'your_api_key'  # Replace with your API key

# Upload audio file
url = f'https://api.minimaxi.chat/v1/files/upload?GroupId={group_id}'
headers = {'Authorization': f'Bearer {api_key}'}
data = {'purpose': 'voice_clone'}
files = {'file': open('audio.mp3', 'rb')}

response = requests.post(url, headers=headers, data=data, files=files)
file_id = response.json().get("file").get("file_id")
print("File ID:", file_id)

Clone the Voice

Once the file is uploaded, use the file_id to create a cloned voice with a custom voice_id.

Endpoint:
https://api.minimaxi.chat/v1/voice_clone

Required Parameters:

  • file_id: The ID of the uploaded file
  • voice_id: Custom user-defined ID (must be at least 8 characters, contain letters and numbers, and start with a letter)

Optional Parameters:

  • noise_reduction: Boolean flag to enable noise reduction (default: false)
  • text: A short text snippet (max 300 characters) to preview the cloned voice
  • model: The text-to-speech model used for preview (speech-01-turbo)
  • accuracy: Text validation threshold (default: 0.7)
  • need_volume_normalization: Boolean flag for volume normalization (default: false)

API Request Example:

url = f"https://api.minimaxi.chat/v1/voice_clone?GroupId={group_id}"
payload = json.dumps({
  "file_id": file_id,
  "voice_id": "CustomVoice123"
})
headers = {
  'Authorization': f'Bearer {api_key}',
  'Content-Type': 'application/json'
}

response = requests.post(url, headers=headers, data=payload)
print("Voice Clone Response:", response.text)

Response Example

${file_id}    
{"input_sensitive":false,"input_sensitive_type":0,"base_resp":{"status_code":0,"status_msg":"success"}}    

Use the Cloned Voice

The cloned voice can be used within MiniMax’s T2A v2 API for speech synthesis. To retain the voice permanently, use it at least once within 7 days; otherwise, it will be automatically deleted.

Voice Cloning API Response Parameters

After sending the request, the API will return a response indicating the success or failure of the cloning process. A successful response looks like this:

Request example

curl --location 'https://api.minimaxi.chat/v1/voice_clone?GroupId=${group_id}' \
--header 'authority: api.minimaxi.chat' \
--header 'authorization: Bearer ${api_key}' \
--header 'content-type: application/json' \
--data '{
    "file_id":your file id,
    "voice_id":"your voice id"
}'

Response example

{
    "input_sensitive": false,
    "input_sensitive_type": 0,
    "base_resp": {
        "status_code": 0,
        "status_msg": "success"
    }
}
Using Apidog for Fast Voice Cloning

Using Apidog for Fast Voice Cloning

Apidog simplifies the testing and visualization of the requests and responses involved in the voice cloning process. Below is a guide on how you can use Apidog in conjunction with the MiniMaxi API.

1. Uploading an Audio File in Apidog

To start the voice cloning process, the first step is uploading an audio file. Apidog provides an easy interface to fill in the parameters without actually running the request.

  • Open Apidog and start a new Request.
  • Set the Authorization header with your API key.
  • Add the purpose parameter with the value voice_clone.
  • Select the audio file (MP3, M4A, WAV) from your local storage.

Apidog Example:

  • Method: POST
  • URL: https://api.minimaxi.chat/v1/files/upload
  • Authorization: Your API key
  • Form Data:
  • purpose: voice_clone
  • file: Select your audio file (e.g., audio.mp3)

Once you fill in the parameters, Apidog will show a mock response with the file_id, which is required for the next step.

2. Cloning the Voice with Apidog

After uploading the audio file and getting the file_id, you can now proceed to clone the voice.

  • Open the Voice Clone API in Apidog.
  • Set the Authorization header with your API key.
  • Enter the file_id you received from the upload step.
  • Provide a custom voice_id (e.g., test1234) for the cloned voice.
  • Optionally, configure additional parameters like noise reduction or volume normalization.

Apidog Example:

  • Method: POST
  • URL: https://api.minimaxi.chat/v1/voice_clone
  • Authorization: Your API key
  • Body:
  • file_id: The ID from your uploaded file
  • voice_id: A custom voice ID (e.g., test1234)

3. Sample API Response in Apidog

Once the request parameters are filled in, Apidog will display the expected response. Here’s an example of what a successful response might look like:

{
    "input_sensitive": false,
    "input_sensitive_type": 0,
    "base_resp": {
        "status_code": 0,
        "status_msg": "success"
    }
}

4. Benefits of Using Apidog

  • No-Code Testing: You don’t need to run the actual request. Just fill in the parameters, and Apidog will simulate the API response.
  • User-Friendly Interface: Apidog’s simple interface allows you to test different parameters and easily track responses.
  • Debugging Made Easy: If an error occurs, the response will include helpful error codes and messages to guide you in troubleshooting.

By using Apidog, you can visualize the request and response structure quickly without needing to execute the actual API calls, making it a convenient tool for testing the MiniMaxi voice cloning features.


Error Codes

If an error occurs during the request, the response will include a base_resp.status_code and base_resp.status_msg for troubleshooting.

Error Code Meaning
1000 Unknown error
1001 Timeout
1002 Trigger RPM restriction
1004 Authentication failure
1039 Trigger TPM restriction
1042 Illegal characters exceeded maximum (more than 10% of input)
2013 Invalid input format

Experience the Future of Voice Technology

MiniMax's T2A-01-HD is a game-changer in AI-driven voice synthesis, offering an unparalleled combination of accuracy, emotional depth, and multilingual support. Whether you need voice cloning for entertainment, accessibility, or business applications, T2A-01-HD delivers unmatched performance.

Try it Now for Free

Developer Quickstart

Learn how to make your first API request using the Group ID and API key. When calling the API, you will need both the GroupID and the API key.GroupID is the unique identifier for your account, linked to your account's privileges. It is associated with your top-ups, billing, and throughput usage.API key is essential for securely accessing the API. Make sure to store it in a secure location, such as an encrypted text file on your computer, to prevent unauthorized access.Follow these steps to obtain them:

1. Get the GroupID:

  • Go to the Account tab and select Your Profile from the left menu.
  • Locate the GroupID field in the basic information. This is a 19-digit number. You can use the copy icon to copy the GroupID.

2. Generate an API Key:

  • In the left menu, click on API Keys, then select Create New Secret Key.
  • Enter a name for the key in the provided field, then click Create.
  • A dialog box will appear. Before clicking Confirm, use the copy icon to securely save the API key, as it will not be displayed again.

With T2A-01-HD, the future of AI-powered voice synthesis is here. Start creating lifelike voices today!

button
How to Deploy Deepseek R1 in the Cloud ?Viewpoint

How to Deploy Deepseek R1 in the Cloud ?

Learn how to deploy Deepseek R1 on AWS, Azure, and Digital Ocean step by step. Optimize performance and use Apidog for seamless API testing. Get started now!

Ashley Innocent

January 30, 2025

How to Use Qwen2.5-Max via APIViewpoint

How to Use Qwen2.5-Max via API

Learn how to use the Qwen2.5-Max API step-by-step, including setup, testing with Apidog, and best practices. Streamline your AI projects today!

Ashley Innocent

January 29, 2025

How to Run Janus-Pro-7B Locally with Transformers.jsViewpoint

How to Run Janus-Pro-7B Locally with Transformers.js

Janus-Pro-7B is revolutionizing local AI with its efficient, high-performance architecture. With 7 billion parameters and optimized features like hybrid architecture, 4-bit quantization, and WebGPU support, this model delivers powerful performance while reducing memory usage.

Emmanuel Mumba

January 28, 2025