#what's the endpoint for the dubbing feature?
1 messages · Page 1 of 1 (latest)
The API does not directly support Dubbing Studio projects, but you can use the standard API endpoint for automatic dubbing. Both options utilize the same dubbing engine and can achieve similar results. If you need further assistance, feel free to reach out.
whats the api for automatic dubbing?
The ElevenLabs API provides an endpoint for automatic dubbing, which allows you to dub audio and video files into various languages. You can use the dub_a_video_or_an_audio_file function to achieve this. Here's a basic example in Python:
def create_dub_from_file(
input_file_path: str,
file_format: str,
source_language: str,
target_language: str,
) -> Optional[str]:
with open(input_file_path, "rb") as audio_file:
response = client.dubbing.dub_a_video_or_an_audio_file(
file=(os.path.basename(input_file_path), audio_file, file_format),
target_lang=target_language,
mode="automatic",
source_lang=source_language,
num_speakers=1,
watermark=False,
)
dubbing_id = response.dubbing_id
if wait_for_dubbing_completion(dubbing_id):
output_file_path = download_dubbed_file(dubbing_id, target_language)
return output_file_path
else:
return None
This function sends a file to the ElevenLabs dubbing service, specifying the source and target languages, and returns the path to the dubbed file. Make sure to handle your API key and other credentials securely.
what are the limits of the API?
The Dubbing API allows for a maximum duration of 2.5 hours and a file size limit of 1 GB. If you need to work with longer projects, you can split them into parts and merge them afterward.
give me the url for the api of automatic dubbing