Learn how to automate the dubbing of audio and video files into various languages using the ElevenLabs API
.env
file in your project directory and fill it with your credentials like so:
wait_for_dubbing_completion()
function within the dubbing_utils.py
file polls the API to check whether the dubbing process is complete. If completed, it proceeds to the next step; otherwise, it reports the status or failure.
download_dubbed_file()
function in dubbing_utils.py
will save the dubbed file to a local directory, typically under the data/{dubbing_id}/{language_code}.mp4
.
wait_for_dubbing_completion
(waitForDubbingCompletion
) function and the download_dubbed_file
(downloadDubbedFile
) function together to create the final function.
No | Language Name | Language Code |
---|---|---|
1 | English | en |
2 | Hindi | hi |
3 | Portuguese | pt |
4 | Chinese | zh |
5 | Spanish | es |
6 | French | fr |
7 | German | de |
8 | Japanese | ja |
9 | Arabic | ar |
10 | Russian | ru |
11 | Korean | ko |
12 | Indonesian | id |
13 | Italian | it |
14 | Dutch | nl |
15 | Turkish | tr |
16 | Polish | pl |
17 | Swedish | sv |
18 | Filipino | fil |
19 | Malay | ms |
20 | Romanian | ro |
21 | Ukrainian | uk |
22 | Greek | el |
23 | Czech | cs |
24 | Danish | da |
25 | Finnish | fi |
26 | Bulgarian | bg |
27 | Croatian | hr |
28 | Slovak | sk |
29 | Tamil | ta |