Spaces:
Running
Running
Salman11223
commited on
Update translate.py
Browse files- translate.py +5 -2
translate.py
CHANGED
@@ -6,9 +6,8 @@ import azure.cognitiveservices.speech as speechsdk
|
|
6 |
from moviepy.editor import AudioFileClip
|
7 |
from gradio_client import Client
|
8 |
|
9 |
-
|
10 |
class Translate:
|
11 |
-
def __init__(self, video_path, target_language
|
12 |
self.video_path = video_path
|
13 |
self.target_language = target_language
|
14 |
self.original_language=original_language
|
@@ -132,6 +131,10 @@ class Translate:
|
|
132 |
translated_file.write(translated_text)
|
133 |
|
134 |
print("Translation complete. Translated text saved to:", translated_text_path)
|
|
|
|
|
|
|
|
|
135 |
|
136 |
|
137 |
|
|
|
6 |
from moviepy.editor import AudioFileClip
|
7 |
from gradio_client import Client
|
8 |
|
|
|
9 |
class Translate:
|
10 |
+
def __init__(self, video_path,original_language, target_language):
|
11 |
self.video_path = video_path
|
12 |
self.target_language = target_language
|
13 |
self.original_language=original_language
|
|
|
131 |
translated_file.write(translated_text)
|
132 |
|
133 |
print("Translation complete. Translated text saved to:", translated_text_path)
|
134 |
+
return translated_text_path
|
135 |
+
|
136 |
+
|
137 |
+
|
138 |
|
139 |
|
140 |
|