Fish Audio 音频复刻
curl --request POST \
--url https://api.highwayapi.ai/v4beta/model \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"type": {},
"title": "<string>",
"train_mode": {},
"voices": [
null
],
"visibility": {},
"description": {},
"cover_image": {},
"texts": [
"<string>"
],
"tags": [
"<string>"
],
"enhance_audio_quality": true
}
'import requests
url = "https://api.highwayapi.ai/v4beta/model"
payload = {
"type": {},
"title": "<string>",
"train_mode": {},
"voices": [None],
"visibility": {},
"description": {},
"cover_image": {},
"texts": ["<string>"],
"tags": ["<string>"],
"enhance_audio_quality": 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({
type: {},
title: '<string>',
train_mode: {},
voices: [null],
visibility: {},
description: {},
cover_image: {},
texts: ['<string>'],
tags: ['<string>'],
enhance_audio_quality: true
})
};
fetch('https://api.highwayapi.ai/v4beta/model', 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/v4beta/model",
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([
'type' => [
],
'title' => '<string>',
'train_mode' => [
],
'voices' => [
null
],
'visibility' => [
],
'description' => [
],
'cover_image' => [
],
'texts' => [
'<string>'
],
'tags' => [
'<string>'
],
'enhance_audio_quality' => 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/v4beta/model"
payload := strings.NewReader("{\n \"type\": {},\n \"title\": \"<string>\",\n \"train_mode\": {},\n \"voices\": [\n null\n ],\n \"visibility\": {},\n \"description\": {},\n \"cover_image\": {},\n \"texts\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"enhance_audio_quality\": 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/v4beta/model")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"type\": {},\n \"title\": \"<string>\",\n \"train_mode\": {},\n \"voices\": [\n null\n ],\n \"visibility\": {},\n \"description\": {},\n \"cover_image\": {},\n \"texts\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"enhance_audio_quality\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.highwayapi.ai/v4beta/model")
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 \"type\": {},\n \"title\": \"<string>\",\n \"train_mode\": {},\n \"voices\": [\n null\n ],\n \"visibility\": {},\n \"description\": {},\n \"cover_image\": {},\n \"texts\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"enhance_audio_quality\": true\n}"
response = http.request(request)
puts response.read_body{
"_id": "<string>",
"type": {},
"title": "<string>",
"description": "<string>",
"cover_image": "<string>",
"state": {},
"tags": [
"<string>"
],
"created_at": {},
"updated_at": {},
"visibility": {},
"like_count": 123,
"mark_count": 123,
"shared_count": 123,
"task_count": 123,
"author": {
"_id": "<string>",
"nickname": "<string>",
"avatar": "<string>"
},
"train_mode": {},
"samples": [
{
"title": "<string>",
"text": "<string>",
"task_id": "<string>",
"audio": "<string>"
}
],
"languages": [
"<string>"
],
"lock_visibility": true,
"unliked": true,
"liked": true,
"marked": true
}音频
Fish Audio 音频复刻
POST
/
v4beta
/
model
Fish Audio 音频复刻
curl --request POST \
--url https://api.highwayapi.ai/v4beta/model \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"type": {},
"title": "<string>",
"train_mode": {},
"voices": [
null
],
"visibility": {},
"description": {},
"cover_image": {},
"texts": [
"<string>"
],
"tags": [
"<string>"
],
"enhance_audio_quality": true
}
'import requests
url = "https://api.highwayapi.ai/v4beta/model"
payload = {
"type": {},
"title": "<string>",
"train_mode": {},
"voices": [None],
"visibility": {},
"description": {},
"cover_image": {},
"texts": ["<string>"],
"tags": ["<string>"],
"enhance_audio_quality": 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({
type: {},
title: '<string>',
train_mode: {},
voices: [null],
visibility: {},
description: {},
cover_image: {},
texts: ['<string>'],
tags: ['<string>'],
enhance_audio_quality: true
})
};
fetch('https://api.highwayapi.ai/v4beta/model', 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/v4beta/model",
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([
'type' => [
],
'title' => '<string>',
'train_mode' => [
],
'voices' => [
null
],
'visibility' => [
],
'description' => [
],
'cover_image' => [
],
'texts' => [
'<string>'
],
'tags' => [
'<string>'
],
'enhance_audio_quality' => 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/v4beta/model"
payload := strings.NewReader("{\n \"type\": {},\n \"title\": \"<string>\",\n \"train_mode\": {},\n \"voices\": [\n null\n ],\n \"visibility\": {},\n \"description\": {},\n \"cover_image\": {},\n \"texts\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"enhance_audio_quality\": 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/v4beta/model")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"type\": {},\n \"title\": \"<string>\",\n \"train_mode\": {},\n \"voices\": [\n null\n ],\n \"visibility\": {},\n \"description\": {},\n \"cover_image\": {},\n \"texts\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"enhance_audio_quality\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.highwayapi.ai/v4beta/model")
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 \"type\": {},\n \"title\": \"<string>\",\n \"train_mode\": {},\n \"voices\": [\n null\n ],\n \"visibility\": {},\n \"description\": {},\n \"cover_image\": {},\n \"texts\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"enhance_audio_quality\": true\n}"
response = http.request(request)
puts response.read_body{
"_id": "<string>",
"type": {},
"title": "<string>",
"description": "<string>",
"cover_image": "<string>",
"state": {},
"tags": [
"<string>"
],
"created_at": {},
"updated_at": {},
"visibility": {},
"like_count": 123,
"mark_count": 123,
"shared_count": 123,
"task_count": 123,
"author": {
"_id": "<string>",
"nickname": "<string>",
"avatar": "<string>"
},
"train_mode": {},
"samples": [
{
"title": "<string>",
"text": "<string>",
"task_id": "<string>",
"audio": "<string>"
}
],
"languages": [
"<string>"
],
"lock_visibility": true,
"unliked": true,
"liked": true,
"marked": true
}Fish Audio API 用于创建语音模型(声音克隆)。
请求头
枚举值:
application/jsonBearer 身份验证格式: Bearer {{API 密钥}}。
请求体
模型类型,tts 代表文本转语音。可选值:
tts允许的值: "tts"模型标题或名称。
模型训练模式,对于 TTS 模型,fast 表示模型在创建后立即可用。可选值:
fast允许的值: "fast"上传用于调优模型的语音文件。
模型可见性,public 将显示在发现页面,unlist 允许任何拥有链接的人访问,private 仅对创建者可见。可选值:
public, unlist, private模型描述。
模型封面图片,如果模型为 public,则此项为必填。
与语音对应的文本,如果未指定,将对语音执行 ASR(自动语音识别)。
模型标签。
增强音频质量。
响应信息
已创建模型的唯一标识符。
模型类型。可选值:
svc, tts模型标题或名称。
模型描述。
模型封面图片的 URL。
模型的当前状态。可选值:
created, training, trained, failed模型标签。
模型创建时的时间戳。
模型最后更新时的时间戳。
模型可见性设置。可选值:
public, unlist, private模型收到的点赞数。
模型收到的收藏/书签数。
模型被分享的次数。
与模型关联的任务数量。
模型使用的训练模式。可选值:
fast, full模型支持的语言。
可见性设置是否被锁定。
当前用户是否已取消点赞该模型。
当前用户是否已点赞该模型。
当前用户是否已收藏/书签该模型。
⌘I