MiniMax 音频快速复刻
curl --request POST \
--url https://api.highwayapi.ai/v3/minimax-voice-cloning \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"audio_url": "<string>",
"text": "<string>",
"model": "<string>",
"accuracy": 123,
"need_noise_reduction": true,
"need_volume_normalization": true
}
'import requests
url = "https://api.highwayapi.ai/v3/minimax-voice-cloning"
payload = {
"audio_url": "<string>",
"text": "<string>",
"model": "<string>",
"accuracy": 123,
"need_noise_reduction": True,
"need_volume_normalization": True
}
headers = {
"Content-Type": "<content-type>",
"Authorization": "<authorization>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': '<content-type>', Authorization: '<authorization>'},
body: JSON.stringify({
audio_url: '<string>',
text: '<string>',
model: '<string>',
accuracy: 123,
need_noise_reduction: true,
need_volume_normalization: true
})
};
fetch('https://api.highwayapi.ai/v3/minimax-voice-cloning', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.highwayapi.ai/v3/minimax-voice-cloning",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'audio_url' => '<string>',
'text' => '<string>',
'model' => '<string>',
'accuracy' => 123,
'need_noise_reduction' => true,
'need_volume_normalization' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.highwayapi.ai/v3/minimax-voice-cloning"
payload := strings.NewReader("{\n \"audio_url\": \"<string>\",\n \"text\": \"<string>\",\n \"model\": \"<string>\",\n \"accuracy\": 123,\n \"need_noise_reduction\": true,\n \"need_volume_normalization\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.highwayapi.ai/v3/minimax-voice-cloning")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"audio_url\": \"<string>\",\n \"text\": \"<string>\",\n \"model\": \"<string>\",\n \"accuracy\": 123,\n \"need_noise_reduction\": true,\n \"need_volume_normalization\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.highwayapi.ai/v3/minimax-voice-cloning")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = '<authorization>'
request.body = "{\n \"audio_url\": \"<string>\",\n \"text\": \"<string>\",\n \"model\": \"<string>\",\n \"accuracy\": 123,\n \"need_noise_reduction\": true,\n \"need_volume_normalization\": true\n}"
response = http.request(request)
puts response.read_body{
"demo_audio_url": "<string>",
"voice_id": "<string>"
}音频
MiniMax 音频快速复刻
POST
/
v3
/
minimax-voice-cloning
MiniMax 音频快速复刻
curl --request POST \
--url https://api.highwayapi.ai/v3/minimax-voice-cloning \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"audio_url": "<string>",
"text": "<string>",
"model": "<string>",
"accuracy": 123,
"need_noise_reduction": true,
"need_volume_normalization": true
}
'import requests
url = "https://api.highwayapi.ai/v3/minimax-voice-cloning"
payload = {
"audio_url": "<string>",
"text": "<string>",
"model": "<string>",
"accuracy": 123,
"need_noise_reduction": True,
"need_volume_normalization": True
}
headers = {
"Content-Type": "<content-type>",
"Authorization": "<authorization>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': '<content-type>', Authorization: '<authorization>'},
body: JSON.stringify({
audio_url: '<string>',
text: '<string>',
model: '<string>',
accuracy: 123,
need_noise_reduction: true,
need_volume_normalization: true
})
};
fetch('https://api.highwayapi.ai/v3/minimax-voice-cloning', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.highwayapi.ai/v3/minimax-voice-cloning",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'audio_url' => '<string>',
'text' => '<string>',
'model' => '<string>',
'accuracy' => 123,
'need_noise_reduction' => true,
'need_volume_normalization' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.highwayapi.ai/v3/minimax-voice-cloning"
payload := strings.NewReader("{\n \"audio_url\": \"<string>\",\n \"text\": \"<string>\",\n \"model\": \"<string>\",\n \"accuracy\": 123,\n \"need_noise_reduction\": true,\n \"need_volume_normalization\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.highwayapi.ai/v3/minimax-voice-cloning")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"audio_url\": \"<string>\",\n \"text\": \"<string>\",\n \"model\": \"<string>\",\n \"accuracy\": 123,\n \"need_noise_reduction\": true,\n \"need_volume_normalization\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.highwayapi.ai/v3/minimax-voice-cloning")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = '<authorization>'
request.body = "{\n \"audio_url\": \"<string>\",\n \"text\": \"<string>\",\n \"model\": \"<string>\",\n \"accuracy\": 123,\n \"need_noise_reduction\": true,\n \"need_volume_normalization\": true\n}"
response = http.request(request)
puts response.read_body{
"demo_audio_url": "<string>",
"voice_id": "<string>"
}本接口支持单、双声道复刻声音,支持按照指定音频文件快速复刻相同音色的语音。
本接口产出的快速复刻音色为临时音色,如您希望永久保留某复刻音色,请于 168 小时(7 天)内在任意 T2A 语音合成接口中调用该音色(不包含本接口内的试听行为);否则,该音色将被删除。
本接口适用场景:IP 复刻、音色克隆等需要快速复刻某一音色的相关场景。
说明:
- 上传的音频文件格式需为:mp3、m4a、wav 格式;
- 上传的音频文件的时长最少应不低于 10 秒,最长应不超过 5 分钟;
- 上传的音频文件大小需不超过 20mb。
请求头
枚举值:
application/jsonBearer 身份验证格式: Bearer {{API 秘钥}}。
请求体
需要复刻音色的音频文件 url。支持 mp3、m4a、wav 格式。
clone_prompt
复刻试听参数。模型将使用复刻后的音色念诵本段文本内容,并以链接的形式将音频合成结果返回,供试听复刻效果。限制 2000 字符以内。注:试听将根据字符数正常收取语音合成费用,定价与 T2A 各接口一致。
复刻试听参数。指定试听使用的语音模型,传”text”字段时必传该字段。
可选项:
可选项:
speech-2.8-hd, speech-2.8-turbo音频复刻参数。取值范围[0,1]。上传该字段会设置文本校验准确率阈值,不传时该字段值默认 0.7。
音频复刻参数。是否开启降噪。不传时默认取 false。
音频复刻参数。是否开启音量归一化。不传时默认取 false。
响应信息
如果请求体中传入了试听文本 text 以及试听模型 model,那么本参数将以链接形式返回试听音频。
生成的 voice_id
⌘I