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
29
import requests
import base64
# Use this function to convert an image file from the filesystem to base64
def image_file_to_base64(image_path):
with open(image_path, 'rb') as f:
image_data = f.read()
return base64.b64encode(image_data).decode('utf-8')
# Use this function to fetch an image from a URL and convert it to base64
def image_url_to_base64(image_url):
response = requests.get(image_url)
image_data = response.content
return base64.b64encode(image_data).decode('utf-8')
api_key = "YOUR_API_KEY"
url = "https://api.segmind.com/v1/dubbing"
# Request payload
data = {
"source_url": "https://segmind-sd-models.s3.amazonaws.com/display_images/dubbing-op.mp3",
"source_lang": "auto",
"target_lang": "hi"
}
headers = {'x-api-key': api_key}
response = requests.post(url, json=data, headers=headers)
print(response.content) # The response is the generated image
Input Audio URL
Source Language
Allowed values:
Target Language
Allowed values:
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.
ElevenLabs Dubbing is an AI model to translate and dub audio content. It streamlines the process of making your audio multilingual, allowing you to reach a wider audience without needing traditional recording studios or voice actors for each target language.
Audio Input: Upload audio files directly.
Language Selection: The model can automatically identify the source language of your audio. You can also manually choose from a list of supported languages. The model supports 29 languages, you can dub your content between any pair of these languages.
Target Language Selection: Select the language you want your audio translated into. ElevenLabs offers 29 languages at present: Chinese, Korean, Dutch, Turkish, Swedish, Indonesian, Filipino, Japanese, Ukrainian, Greek, Czech, Finnish, Romanian, Russian, Danish, Bulgarian, Malay, Slovak, Croatian, Classic Arabic, Tamil, English, Polish, German, Spanish, French, Italian, Hindi and Portuguese.
AI-powered Dubbing: The model will translate the audio content while attempting to match the speaker's voice characteristics, intonation, and emotional delivery in the target language.
Simplified Workflow: Eliminate the need for traditional dubbing studios and voice actors for each target language. Translate and dub your audio content efficiently within a single platform.
Multilingual Reach: Expand the reach of your audio content by making it accessible to audiences speaking different languages.
Cost-effective Solution: Potentially reduce production costs associated with traditional dubbing methods.
Time-saving: Streamline your audio translation and dubbing process compared to conventional methods.