ElevenLabs Text-zu-Sprache V3
curl --request POST \
--url https://api.highwayapi.ai/v3/elevenlabs-tts-v3 \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"seed": 123,
"text": "<string>",
"stream": true,
"voice_id": "<string>",
"language_code": "<string>",
"output_format": "<string>",
"use_pvc_as_ivc": true,
"voice_settings": {
"speed": 123,
"style": 123,
"stability": 123,
"similarity_boost": 123,
"use_speaker_boost": true
},
"apply_text_normalization": "<string>",
"apply_language_text_normalization": true,
"pronunciation_dictionary_locators": [
{
"version_id": "<string>",
"pronunciation_dictionary_id": "<string>"
}
]
}
'import requests
url = "https://api.highwayapi.ai/v3/elevenlabs-tts-v3"
payload = {
"seed": 123,
"text": "<string>",
"stream": True,
"voice_id": "<string>",
"language_code": "<string>",
"output_format": "<string>",
"use_pvc_as_ivc": True,
"voice_settings": {
"speed": 123,
"style": 123,
"stability": 123,
"similarity_boost": 123,
"use_speaker_boost": True
},
"apply_text_normalization": "<string>",
"apply_language_text_normalization": True,
"pronunciation_dictionary_locators": [
{
"version_id": "<string>",
"pronunciation_dictionary_id": "<string>"
}
]
}
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({
seed: 123,
text: '<string>',
stream: true,
voice_id: '<string>',
language_code: '<string>',
output_format: '<string>',
use_pvc_as_ivc: true,
voice_settings: {
speed: 123,
style: 123,
stability: 123,
similarity_boost: 123,
use_speaker_boost: true
},
apply_text_normalization: '<string>',
apply_language_text_normalization: true,
pronunciation_dictionary_locators: [{version_id: '<string>', pronunciation_dictionary_id: '<string>'}]
})
};
fetch('https://api.highwayapi.ai/v3/elevenlabs-tts-v3', 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/elevenlabs-tts-v3",
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([
'seed' => 123,
'text' => '<string>',
'stream' => true,
'voice_id' => '<string>',
'language_code' => '<string>',
'output_format' => '<string>',
'use_pvc_as_ivc' => true,
'voice_settings' => [
'speed' => 123,
'style' => 123,
'stability' => 123,
'similarity_boost' => 123,
'use_speaker_boost' => true
],
'apply_text_normalization' => '<string>',
'apply_language_text_normalization' => true,
'pronunciation_dictionary_locators' => [
[
'version_id' => '<string>',
'pronunciation_dictionary_id' => '<string>'
]
]
]),
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/elevenlabs-tts-v3"
payload := strings.NewReader("{\n \"seed\": 123,\n \"text\": \"<string>\",\n \"stream\": true,\n \"voice_id\": \"<string>\",\n \"language_code\": \"<string>\",\n \"output_format\": \"<string>\",\n \"use_pvc_as_ivc\": true,\n \"voice_settings\": {\n \"speed\": 123,\n \"style\": 123,\n \"stability\": 123,\n \"similarity_boost\": 123,\n \"use_speaker_boost\": true\n },\n \"apply_text_normalization\": \"<string>\",\n \"apply_language_text_normalization\": true,\n \"pronunciation_dictionary_locators\": [\n {\n \"version_id\": \"<string>\",\n \"pronunciation_dictionary_id\": \"<string>\"\n }\n ]\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/elevenlabs-tts-v3")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"seed\": 123,\n \"text\": \"<string>\",\n \"stream\": true,\n \"voice_id\": \"<string>\",\n \"language_code\": \"<string>\",\n \"output_format\": \"<string>\",\n \"use_pvc_as_ivc\": true,\n \"voice_settings\": {\n \"speed\": 123,\n \"style\": 123,\n \"stability\": 123,\n \"similarity_boost\": 123,\n \"use_speaker_boost\": true\n },\n \"apply_text_normalization\": \"<string>\",\n \"apply_language_text_normalization\": true,\n \"pronunciation_dictionary_locators\": [\n {\n \"version_id\": \"<string>\",\n \"pronunciation_dictionary_id\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.highwayapi.ai/v3/elevenlabs-tts-v3")
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 \"seed\": 123,\n \"text\": \"<string>\",\n \"stream\": true,\n \"voice_id\": \"<string>\",\n \"language_code\": \"<string>\",\n \"output_format\": \"<string>\",\n \"use_pvc_as_ivc\": true,\n \"voice_settings\": {\n \"speed\": 123,\n \"style\": 123,\n \"stability\": 123,\n \"similarity_boost\": 123,\n \"use_speaker_boost\": true\n },\n \"apply_text_normalization\": \"<string>\",\n \"apply_language_text_normalization\": true,\n \"pronunciation_dictionary_locators\": [\n {\n \"version_id\": \"<string>\",\n \"pronunciation_dictionary_id\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyAudio
ElevenLabs Text-zu-Sprache V3
POST
/
v3
/
elevenlabs-tts-v3
ElevenLabs Text-zu-Sprache V3
curl --request POST \
--url https://api.highwayapi.ai/v3/elevenlabs-tts-v3 \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"seed": 123,
"text": "<string>",
"stream": true,
"voice_id": "<string>",
"language_code": "<string>",
"output_format": "<string>",
"use_pvc_as_ivc": true,
"voice_settings": {
"speed": 123,
"style": 123,
"stability": 123,
"similarity_boost": 123,
"use_speaker_boost": true
},
"apply_text_normalization": "<string>",
"apply_language_text_normalization": true,
"pronunciation_dictionary_locators": [
{
"version_id": "<string>",
"pronunciation_dictionary_id": "<string>"
}
]
}
'import requests
url = "https://api.highwayapi.ai/v3/elevenlabs-tts-v3"
payload = {
"seed": 123,
"text": "<string>",
"stream": True,
"voice_id": "<string>",
"language_code": "<string>",
"output_format": "<string>",
"use_pvc_as_ivc": True,
"voice_settings": {
"speed": 123,
"style": 123,
"stability": 123,
"similarity_boost": 123,
"use_speaker_boost": True
},
"apply_text_normalization": "<string>",
"apply_language_text_normalization": True,
"pronunciation_dictionary_locators": [
{
"version_id": "<string>",
"pronunciation_dictionary_id": "<string>"
}
]
}
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({
seed: 123,
text: '<string>',
stream: true,
voice_id: '<string>',
language_code: '<string>',
output_format: '<string>',
use_pvc_as_ivc: true,
voice_settings: {
speed: 123,
style: 123,
stability: 123,
similarity_boost: 123,
use_speaker_boost: true
},
apply_text_normalization: '<string>',
apply_language_text_normalization: true,
pronunciation_dictionary_locators: [{version_id: '<string>', pronunciation_dictionary_id: '<string>'}]
})
};
fetch('https://api.highwayapi.ai/v3/elevenlabs-tts-v3', 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/elevenlabs-tts-v3",
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([
'seed' => 123,
'text' => '<string>',
'stream' => true,
'voice_id' => '<string>',
'language_code' => '<string>',
'output_format' => '<string>',
'use_pvc_as_ivc' => true,
'voice_settings' => [
'speed' => 123,
'style' => 123,
'stability' => 123,
'similarity_boost' => 123,
'use_speaker_boost' => true
],
'apply_text_normalization' => '<string>',
'apply_language_text_normalization' => true,
'pronunciation_dictionary_locators' => [
[
'version_id' => '<string>',
'pronunciation_dictionary_id' => '<string>'
]
]
]),
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/elevenlabs-tts-v3"
payload := strings.NewReader("{\n \"seed\": 123,\n \"text\": \"<string>\",\n \"stream\": true,\n \"voice_id\": \"<string>\",\n \"language_code\": \"<string>\",\n \"output_format\": \"<string>\",\n \"use_pvc_as_ivc\": true,\n \"voice_settings\": {\n \"speed\": 123,\n \"style\": 123,\n \"stability\": 123,\n \"similarity_boost\": 123,\n \"use_speaker_boost\": true\n },\n \"apply_text_normalization\": \"<string>\",\n \"apply_language_text_normalization\": true,\n \"pronunciation_dictionary_locators\": [\n {\n \"version_id\": \"<string>\",\n \"pronunciation_dictionary_id\": \"<string>\"\n }\n ]\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/elevenlabs-tts-v3")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"seed\": 123,\n \"text\": \"<string>\",\n \"stream\": true,\n \"voice_id\": \"<string>\",\n \"language_code\": \"<string>\",\n \"output_format\": \"<string>\",\n \"use_pvc_as_ivc\": true,\n \"voice_settings\": {\n \"speed\": 123,\n \"style\": 123,\n \"stability\": 123,\n \"similarity_boost\": 123,\n \"use_speaker_boost\": true\n },\n \"apply_text_normalization\": \"<string>\",\n \"apply_language_text_normalization\": true,\n \"pronunciation_dictionary_locators\": [\n {\n \"version_id\": \"<string>\",\n \"pronunciation_dictionary_id\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.highwayapi.ai/v3/elevenlabs-tts-v3")
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 \"seed\": 123,\n \"text\": \"<string>\",\n \"stream\": true,\n \"voice_id\": \"<string>\",\n \"language_code\": \"<string>\",\n \"output_format\": \"<string>\",\n \"use_pvc_as_ivc\": true,\n \"voice_settings\": {\n \"speed\": 123,\n \"style\": 123,\n \"stability\": 123,\n \"similarity_boost\": 123,\n \"use_speaker_boost\": true\n },\n \"apply_text_normalization\": \"<string>\",\n \"apply_language_text_normalization\": true,\n \"pronunciation_dictionary_locators\": [\n {\n \"version_id\": \"<string>\",\n \"pronunciation_dictionary_id\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyKonvertiert Text mit der von Ihnen gewählten Stimme in Sprache und gibt Audio zurück.
Request-Header
string
erforderlich
Enumerationswert:
application/jsonstring
erforderlich
Bearer-Authentifizierungsformat: Bearer {{API Key}}.
Request-Body
integer
Wenn angegeben, versucht das System, möglichst deterministisch zu sampeln. Wiederholte Anfragen mit demselben seed und denselben Parametern sollten dasselbe Ergebnis zurückgeben, vollständige Deterministik wird jedoch nicht garantiert.Wertebereich: [0, 4294967295]
string
erforderlich
Der Text, der in Sprache umgewandelt werden soll.
boolean
Ob der Stream-Modus aktiviert werden soll
string
erforderlich
Die zu verwendende Sprach-ID.
string
Sprachcode (ISO 639-1) für das Modell und die Textnormalisierung. Wenn das Modell diesen Sprachcode nicht unterstützt, wird ein Fehler zurückgegeben.
string
Standard:"mp3_44100_128"
Das Ausgabeformat des generierten Audios. Das Format lautet codec_sample_rate_bitrate. Für eine MP3-Bitrate von 192 kbps ist ein Creator-Konto oder höher erforderlich, für eine PCM-Abtastrate von 44,1 kHz ein Pro-Konto oder höher.Optionale Werte:
mp3_22050_32, mp3_24000_48, mp3_44100_32, mp3_44100_64, mp3_44100_96, mp3_44100_128, mp3_44100_192, pcm_8000, pcm_16000, pcm_22050, pcm_24000, pcm_32000, pcm_44100, pcm_48000, ulaw_8000, alaw_8000, opus_48000_32, opus_48000_64, opus_48000_96, opus_48000_128, opus_48000_192boolean
Standard:false
Wenn true, wird die IVC-Version der Stimme anstelle der PVC-Version verwendet. Dies ist eine vorübergehende Lösung für die höhere Latenz der PVC-Version.
object
Ausblenden Eigenschaften
Ausblenden Eigenschaften
number
Standard:1
Passt die Sprechgeschwindigkeit an. 1.0 ist die Standardgeschwindigkeit; Werte unter 1.0 verlangsamen das Sprechen, Werte über 1.0 beschleunigen es.
number
Standard:0
Bestimmt, wie stark der Sprachstil überzeichnet wird. Versucht, den Stil des ursprünglichen Sprechers zu verstärken. Wenn der Wert ungleich 0 ist, werden mehr Rechenressourcen verbraucht und die Latenz kann steigen.
number
Bestimmt die Stabilität der Sprachgenerierung und die Zufälligkeit zwischen einzelnen Generierungen. Niedrigere Werte ermöglichen einen breiteren emotionalen Ausdruck, höhere Werte können zu monotoner Sprache führen.
number
Bestimmt, wie genau die KI versucht, die ursprüngliche Stimme nachzubilden.
boolean
Standard:true
Erhöht die Ähnlichkeit mit dem ursprünglichen Sprecher. Erfordert etwas mehr Rechenleistung und erhöht die Latenz.
string
Standard:"auto"
Steuert die Textnormalisierung. ‘auto’ lässt das System entscheiden, ‘on’ normalisiert immer, ‘off’ überspringt die Normalisierung.Optionale Werte:
auto, on, offboolean
Standard:false
Steuert die sprachspezifische Textnormalisierung für bestimmte unterstützte Sprachen, um eine natürlichere Aussprache zu erreichen. Warnung: Dies kann die Latenz erheblich erhöhen. Derzeit wird nur Japanisch unterstützt.
object[]
Liste der Aussprachewörterbuch-Locators (id, version_id), die auf den Text angewendet werden sollen. Sie werden der Reihe nach angewendet. Pro Anfrage sind maximal 3 Locators zulässig.Array-Länge: 0 - 3
Antwortinformationen
Generierte Audiodatei Format:binary