Text zu Sprache (HTTP)

Stimmklon - Modell erstellen

Lip-sync - Aufgabe erstellen

Benutzerprofil

Text zu Sprache (HTTP) (HTTP)

REST-Synthese mit Sprachmodell-ID und Engine-Optionen.

Text zu Sprache (HTTP)

Endpoint

POST /api/open/v1/speech/tts

Request-Header

// Request-Parameter
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY  // API-Key

// Request-Parameter
Content-Type: application/msgpack
Authorization: Bearer YOUR_API_KEY  // API-Key

Request-Parameter

Beispiel-Request-Parameter

Verfügbare Optionen:

  • Text zu Sprache (HTTP): v1, v2, s1
  • Text zu Sprache (HTTP v2): v3-turbo, v3-hd
  • Optional einstellbar: Sprache mit Voice-ID und optionalen Engine-Einstellungen erzeugen.

Antwortdaten

// Antwortdaten (cache=false) - 200
Content-Type: audio/mpeg
<Mehrere Formate>

// Antwortdaten (cache=true) - 200
Content-Type: application/json
{
  "success": boolean,        // Antwortdaten
  "audio_url": string,       // Sprache zu Text
  "format": string,          // Mehrere Formate
  "characters_used": number, // Request-Parameter
  "quota_remaining": number  // Verbleibende API-Quote und Kontoinformationen anzeigen.
}

// Abfrage fehlgeschlagen
{
  "error": string     // Abfrage fehlgeschlagen
}

CURL-Beispiel

# Request-Parameter - Optional einstellbar
curl -X POST https://fishaudio.org/api/open/v1/speech/tts \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "voiceId": "your_voice_id",
    "modelId": "fishaudio-s21pro-flash",
    "text": "Sprache zu Text",
    "speed": 1.0,
    "volume": 0,
    "format": "mp3",
    "cache": false
  }' \
  --output output.mp3

# Request-Parameter - Verfügbare Optionen:
curl -X POST https://fishaudio.org/api/open/v1/speech/tts \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "voiceId": "your_voice_id",
    "modelId": "minimax-2.8-hd",
    "text": "Sprache zu Text",
    "speed": 1.0,
    "volume": 0,
    "emotion": "calm",
    "language": "zh",
    "format": "mp3",
    "cache": false
  }' \
  --output output.mp3

# Request-Parameter (undefined)

Online-Debugging

Statuscodes

200: Success
400: Bad Request
401: Unauthorized
403: Forbidden
404: Not Found
429: Too Many Requests
500: Internal Server Error