Spaces:
Runtime error
Runtime error
Rehman1603
commited on
Commit
•
7055298
1
Parent(s):
ffb16dc
Create appuiu.py
Browse files
appuiu.py
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
|
3 |
+
|
4 |
+
|
5 |
+
|
6 |
+
|
7 |
+
# @title Main Function
|
8 |
+
def main_fun(video_url,language):
|
9 |
+
lang="eu"
|
10 |
+
if(language=="English"):
|
11 |
+
lang="eu"
|
12 |
+
elif language=="Urdu":
|
13 |
+
lang="ur"
|
14 |
+
elif language=="Arabic":
|
15 |
+
lang="ar"
|
16 |
+
elif language=="Hindi":
|
17 |
+
lang="hi"
|
18 |
+
downlaod_video_path=download_video(video_url)
|
19 |
+
downlaod_audio_file_path=Downlaod_Audio(downlaod_video_path)
|
20 |
+
chunks_translate_data=audio_into_chunks_transcribe_translate(downlaod_audio_file_path,lang)
|
21 |
+
voice=Clear_voice()
|
22 |
+
output_voice_list=Text_to_Speech(chunks_translate_data,lang,voice)
|
23 |
+
merge_voice=Merged_chunks(output_voice_list)
|
24 |
+
result=Video_dub(downlaod_video_path,merge_voice)
|
25 |
+
return result
|
26 |
+
|