Zum Hauptinhalt springen
POST
/
v4beta
/
model
Fish Audio Audio-Klonen
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
}
Die Fish Audio API dient zum Erstellen von Sprachmodellen (Stimmklonen).

Anfrageheader

Content-Type
string
erforderlich
Enumerationswert: application/json
Authorization
string
erforderlich
Bearer-Authentifizierungsformat: Bearer {{API Key}}.

Anfragetext

type
enum<string>
erforderlich
Modelltyp; tts steht für Text-to-Speech.Optionale Werte: ttsZulässige Werte: "tts"
title
string
erforderlich
Modelltitel oder -name.
train_mode
enum<string>
erforderlich
Trainingsmodus des Modells; bei TTS-Modellen bedeutet fast, dass das Modell direkt nach der Erstellung verfügbar ist.Optionale Werte: fastZulässige Werte: "fast"
voices
file[]
erforderlich
Hochzuladende Sprachdateien zur Feinabstimmung des Modells.
visibility
enum<string>
Standard:"public"
Sichtbarkeit des Modells; public wird auf der Entdecken-Seite angezeigt, unlist erlaubt den Zugriff für alle Personen mit Link, private ist nur für den Ersteller sichtbar.Optionale Werte: public, unlist, private
description
string | null
Modellbeschreibung.
cover_image
file | null
Coverbild des Modells; wenn das Modell public ist, ist dieses Feld erforderlich.
texts
string[]
Den Sprachdateien entsprechende Texte; wenn nicht angegeben, wird für die Sprachdateien ASR (automatische Spracherkennung) ausgeführt.
tags
string[]
Modell-Tags.
enhance_audio_quality
boolean
Standard:false
Audioqualität verbessern.

Antwortinformationen

_id
string
erforderlich
Eindeutiger Bezeichner des erstellten Modells.
type
enum<string>
erforderlich
Modelltyp.Optionale Werte: svc, tts
title
string
erforderlich
Modelltitel oder -name.
description
string
erforderlich
Modellbeschreibung.
cover_image
string
erforderlich
URL des Modell-Coverbilds.
state
enum<string>
erforderlich
Aktueller Status des Modells.Optionale Werte: created, training, trained, failed
tags
string[]
erforderlich
Modell-Tags.
created_at
string<date-time>
erforderlich
Zeitstempel der Modellerstellung.
updated_at
string<date-time>
erforderlich
Zeitstempel der letzten Aktualisierung des Modells.
visibility
enum<string>
erforderlich
Sichtbarkeitseinstellung des Modells.Optionale Werte: public, unlist, private
like_count
integer
erforderlich
Anzahl der Likes, die das Modell erhalten hat.
mark_count
integer
erforderlich
Anzahl der Favoriten/Lesezeichen, die das Modell erhalten hat.
shared_count
integer
erforderlich
Anzahl der Male, die das Modell geteilt wurde.
task_count
integer
erforderlich
Anzahl der mit dem Modell verknüpften Aufgaben.
author
AuthorEntity · object
erforderlich
Informationen zum Autor des Modells.
train_mode
enum<string>
Standard:"full"
Trainingsmodus, der vom Modell verwendet wird.Optionale Werte: fast, full
samples
SampleEntity · object[]
Mit dem Modell verknüpfte Beispieldaten.
languages
string[]
Vom Modell unterstützte Sprachen.
lock_visibility
boolean
Standard:false
Ob die Sichtbarkeitseinstellung gesperrt ist.
unliked
boolean
Standard:false
Ob der aktuelle Benutzer sein Like für dieses Modell zurückgenommen hat.
liked
boolean
Standard:false
Ob der aktuelle Benutzer dieses Modell gelikt hat.
marked
boolean
Standard:false
Ob der aktuelle Benutzer dieses Modell favorisiert/als Lesezeichen gespeichert hat.