1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
const axios = require('axios');
const api_key = "YOUR API-KEY";
const url = "https://api.segmind.com/v1/tts-eleven-labs";
const data = {
"prompt": "In today's fast-paced world, many of us find ourselves racing against time. We're always planning, worrying, or reminiscing.",
"voice": "Sarah",
"model_id": "eleven_multilingual_v2",
"stability": 0.5,
"use_speaker_boost": true,
"similarity_boost": 0.75,
"style": 0,
"speed": 1,
"seed": 0,
"apply_text_normalization": "auto",
"apply_language_text_normalization": false
};
(async function() {
try {
const response = await axios.post(url, data, { headers: { 'x-api-key': api_key } });
console.log(response.data);
} catch (error) {
console.error('Error:', error.response.data);
}
})();A text to get the audio output
Voice name
Allowed values:
ElevenLabs voice ID (e.g., '21m00Tcm4TlvDq8ikWAM'). If not provided, voice parameter will be used.
Model identifier
Allowed values:
Language code (ISO 639-1) to enforce a language for the model
Allowed values:
Voice stability (0-1). Lower values introduce broader emotional range.
min : 0,
max : 1
Boosts similarity to the original speaker
How closely the AI should adhere to the original voice (0-1)
min : 0,
max : 1
Style exaggeration of the voice (0-1)
min : 0,
max : 1
Adjusts the speed of the voice. 1.0 is default speed.
min : 0.25,
max : 4
Seed for deterministic sampling (0-4294967295)
min : 0,
max : 4294967295
Controls text normalization (auto/on/off)
Allowed values:
Controls language text normalization. Currently only supported for Japanese.
To keep track of your credit usage, you can inspect the response headers of each API call. The x-remaining-credits property will indicate the number of remaining credits in your account. Ensure you monitor this value to avoid any disruptions in your API usage.
Eleven Labs Text-to-Speech (TTS) harnesses the power of deep learning to create realistic and engaging synthetic speech from written text. This user-friendly platform caters to a broad range of applications, including content creation, eLearning development, and marketing materials.
Natural-sounding Speech Synthesis: Produce high-quality audio that closely resembles human speech patterns, enhancing listener engagement.
Customizable Voice Selection: Choose from a library of diverse voices with varying accents, genders, and speaking styles for tailored audio experiences.
Advanced Emotional Control: Inflect the synthetic speech with desired emotions for impactful storytelling, presentations, or educational content.
Seamless Integration: Integrate Eleven Labs TTS with existing workflows through their API for efficient text-to-speech conversion.
Speaker Diarization: Automatically identify and differentiate between multiple speakers within a text script, ideal for generating audio dialogues or audiobooks.
Enhanced Content Creation: Generate high-quality voiceovers or audio narration for videos, presentations, and eLearning modules.
Improved Accessibility: Create audio descriptions or convert text-based content into spoken format for visually impaired audiences.
Streamlined Marketing Efforts: Produce engaging audio ads or product demonstrations for increased reach and brand awareness.
Multilingual Content Development: Generate multilingual audio content with natural-sounding voices to expand your global audience.
Realistic Voice Prototyping: Experiment with different voice styles and emotions to test the impact of your text content before final production.