ElevenLabs Text to Speech Multilingual V2
curl --request POST \
--url https://api.highwayapi.ai/v3/elevenlabs-tts-multilingual-v2 \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"seed": 123,
"text": "<string>",
"voice_id": "<string>",
"next_text": "<string>",
"language_code": "<string>",
"output_format": "<string>",
"previous_text": "<string>",
"use_pvc_as_ivc": true,
"voice_settings": {
"speed": 123,
"style": 123,
"stability": 123,
"similarity_boost": 123,
"use_speaker_boost": true
},
"next_request_ids": [
"<string>"
],
"previous_request_ids": [
"<string>"
],
"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-multilingual-v2"
payload = {
"seed": 123,
"text": "<string>",
"voice_id": "<string>",
"next_text": "<string>",
"language_code": "<string>",
"output_format": "<string>",
"previous_text": "<string>",
"use_pvc_as_ivc": True,
"voice_settings": {
"speed": 123,
"style": 123,
"stability": 123,
"similarity_boost": 123,
"use_speaker_boost": True
},
"next_request_ids": ["<string>"],
"previous_request_ids": ["<string>"],
"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>',
voice_id: '<string>',
next_text: '<string>',
language_code: '<string>',
output_format: '<string>',
previous_text: '<string>',
use_pvc_as_ivc: true,
voice_settings: {
speed: 123,
style: 123,
stability: 123,
similarity_boost: 123,
use_speaker_boost: true
},
next_request_ids: ['<string>'],
previous_request_ids: ['<string>'],
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-multilingual-v2', 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-multilingual-v2",
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>',
'voice_id' => '<string>',
'next_text' => '<string>',
'language_code' => '<string>',
'output_format' => '<string>',
'previous_text' => '<string>',
'use_pvc_as_ivc' => true,
'voice_settings' => [
'speed' => 123,
'style' => 123,
'stability' => 123,
'similarity_boost' => 123,
'use_speaker_boost' => true
],
'next_request_ids' => [
'<string>'
],
'previous_request_ids' => [
'<string>'
],
'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-multilingual-v2"
payload := strings.NewReader("{\n \"seed\": 123,\n \"text\": \"<string>\",\n \"voice_id\": \"<string>\",\n \"next_text\": \"<string>\",\n \"language_code\": \"<string>\",\n \"output_format\": \"<string>\",\n \"previous_text\": \"<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 \"next_request_ids\": [\n \"<string>\"\n ],\n \"previous_request_ids\": [\n \"<string>\"\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-multilingual-v2")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"seed\": 123,\n \"text\": \"<string>\",\n \"voice_id\": \"<string>\",\n \"next_text\": \"<string>\",\n \"language_code\": \"<string>\",\n \"output_format\": \"<string>\",\n \"previous_text\": \"<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 \"next_request_ids\": [\n \"<string>\"\n ],\n \"previous_request_ids\": [\n \"<string>\"\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-multilingual-v2")
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 \"voice_id\": \"<string>\",\n \"next_text\": \"<string>\",\n \"language_code\": \"<string>\",\n \"output_format\": \"<string>\",\n \"previous_text\": \"<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 \"next_request_ids\": [\n \"<string>\"\n ],\n \"previous_request_ids\": [\n \"<string>\"\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 to Speech Multilingual V2
POST
/
v3
/
elevenlabs-tts-multilingual-v2
ElevenLabs Text to Speech Multilingual V2
curl --request POST \
--url https://api.highwayapi.ai/v3/elevenlabs-tts-multilingual-v2 \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"seed": 123,
"text": "<string>",
"voice_id": "<string>",
"next_text": "<string>",
"language_code": "<string>",
"output_format": "<string>",
"previous_text": "<string>",
"use_pvc_as_ivc": true,
"voice_settings": {
"speed": 123,
"style": 123,
"stability": 123,
"similarity_boost": 123,
"use_speaker_boost": true
},
"next_request_ids": [
"<string>"
],
"previous_request_ids": [
"<string>"
],
"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-multilingual-v2"
payload = {
"seed": 123,
"text": "<string>",
"voice_id": "<string>",
"next_text": "<string>",
"language_code": "<string>",
"output_format": "<string>",
"previous_text": "<string>",
"use_pvc_as_ivc": True,
"voice_settings": {
"speed": 123,
"style": 123,
"stability": 123,
"similarity_boost": 123,
"use_speaker_boost": True
},
"next_request_ids": ["<string>"],
"previous_request_ids": ["<string>"],
"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>',
voice_id: '<string>',
next_text: '<string>',
language_code: '<string>',
output_format: '<string>',
previous_text: '<string>',
use_pvc_as_ivc: true,
voice_settings: {
speed: 123,
style: 123,
stability: 123,
similarity_boost: 123,
use_speaker_boost: true
},
next_request_ids: ['<string>'],
previous_request_ids: ['<string>'],
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-multilingual-v2', 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-multilingual-v2",
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>',
'voice_id' => '<string>',
'next_text' => '<string>',
'language_code' => '<string>',
'output_format' => '<string>',
'previous_text' => '<string>',
'use_pvc_as_ivc' => true,
'voice_settings' => [
'speed' => 123,
'style' => 123,
'stability' => 123,
'similarity_boost' => 123,
'use_speaker_boost' => true
],
'next_request_ids' => [
'<string>'
],
'previous_request_ids' => [
'<string>'
],
'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-multilingual-v2"
payload := strings.NewReader("{\n \"seed\": 123,\n \"text\": \"<string>\",\n \"voice_id\": \"<string>\",\n \"next_text\": \"<string>\",\n \"language_code\": \"<string>\",\n \"output_format\": \"<string>\",\n \"previous_text\": \"<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 \"next_request_ids\": [\n \"<string>\"\n ],\n \"previous_request_ids\": [\n \"<string>\"\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-multilingual-v2")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"seed\": 123,\n \"text\": \"<string>\",\n \"voice_id\": \"<string>\",\n \"next_text\": \"<string>\",\n \"language_code\": \"<string>\",\n \"output_format\": \"<string>\",\n \"previous_text\": \"<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 \"next_request_ids\": [\n \"<string>\"\n ],\n \"previous_request_ids\": [\n \"<string>\"\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-multilingual-v2")
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 \"voice_id\": \"<string>\",\n \"next_text\": \"<string>\",\n \"language_code\": \"<string>\",\n \"output_format\": \"<string>\",\n \"previous_text\": \"<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 \"next_request_ids\": [\n \"<string>\"\n ],\n \"previous_request_ids\": [\n \"<string>\"\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_bodyConvert text to speech using the voice of your choice and return audio.
Request Headers
string
required
Enum value:
application/jsonstring
required
Bearer authentication format: Bearer {{API Key}}.
Request Body
integer
If specified, the system will attempt to sample deterministically. Repeated requests with the same seed and parameters should return the same result, but full determinism is not guaranteed.Value range: [0, 4294967295]
string
required
The text to convert to speech.
string
required
The voice ID to use.
string
The text after the current request text. Used to improve speech continuity when stitching together multiple generations.
string
The language code (ISO 639-1) used for the model and text normalization. If the model does not support this language code, an error will be returned.
string
default:"mp3_44100_128"
The output format of the generated audio. The format is codec_sample_rate_bitrate. MP3 at 192kbps requires a Creator or higher account, and PCM at 44.1kHz requires a Pro or higher account.Available values:
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_192string
The text before the current request text. Used to improve speech continuity when stitching together multiple generations.
boolean
default:false
If true, uses the IVC version of the voice instead of the PVC version. This is a temporary workaround for the higher latency of the PVC version.
object
Hide properties
Hide properties
number
default:1
Adjusts the speed of the speech. 1.0 is the default speed; values below 1.0 slow down the speech, and values above 1.0 speed it up.
number
default:0
Determines the degree of exaggeration in the speech style. Attempts to amplify the original speaker’s style. Setting this to a non-zero value consumes more compute resources and may increase latency.
number
Determines the stability of speech generation and the randomness between generations. Lower values provide a broader emotional range, while higher values may result in monotonous speech.
number
Determines how closely the AI attempts to replicate the original voice.
boolean
default:true
Enhances similarity to the original speaker. Requires a slightly higher computational load and increases latency.
string[]
A list of request_id values for subsequent samples. Used to maintain speech continuity when regenerating samples. You can pass up to 3 request_id values.Array length: 0 - 3
string[]
A list of request_id values for samples already generated before the current generation. Can be used to improve speech continuity. You can pass up to 3 request_id values.Array length: 0 - 3
string
default:"auto"
Controls text normalization. ‘auto’ is determined by the system, ‘on’ always normalizes, and ‘off’ skips it.Available values:
auto, on, offboolean
default:false
Controls language text normalization for certain supported languages to achieve more natural pronunciation. Warning: this may significantly increase latency. Currently, only Japanese is supported.
object[]
A list of pronunciation dictionary locators (id, version_id) to apply to the text. Applied in order. Each request can include up to 3 locators.Array length: 0 - 3
Response Information
Generated audio file Format:binary