File size: 1,220 Bytes
dd89fa4
 
 
 
8815104
dd89fa4
 
 
 
 
 
 
 
 
8815104
 
dd89fa4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8815104
 
 
dd89fa4
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
30
31
32
33
34
35
36
37
38
39
40
# import ytdownloader
# import trans
# import transcribe
# import texttospeech
import audioex
audioex.ex()
# from time import sleep
# import edit
# import subprocess
# try:
#     subprocess.run("pip uninstall whisper", shell=True)
#     subprocess.run("pip install -U openai-whisper", shell=True)
# except:
#     pass
import streamlit
streamlit.title("Video Dubber")
# lang = ['en', 'es', 'fr', 'de', 'it', 'pt', 'pl', 'tr', 'ru', 'nl', 'cs', 'ar', 'zh-cn', 'hu', 'ko', 'ja', 'hi']
# def main():
#     link = streamlit.text_input("Please enter Youtube video link = ")
#     selected_language = streamlit.selectbox("Select a language:", lang)
#     if streamlit.button("Submit"):
#         ytdownloader.download_youtube_video(link, "video")
#         sleep(5)
#         audioex.ex()
#         sleep(5)
#         video_text = transcribe.transcibe("speech.wav")
#         sleep(5)
#         trans_text = trans.mixtral(video_text)
#         streamlit.text(trans_text)
#         sleep(5)
#         texttospeech.speak(trans_text, selected_language)
#         sleep(5)
#         edit.mute_and_add_audio("video.mp4", "output.wav", "output_video.mp4")
#         sleep(5)
#         streamlit.video("output_video.mp4")



# main()