Spaces:
Sleeping
Sleeping
Update Milestone5API.py
Browse files- Milestone5API.py +1 -1
Milestone5API.py
CHANGED
|
@@ -68,7 +68,7 @@ def text_to_speech(translated_text_file_path, video_path):
|
|
| 68 |
output_video_path = f"CS370_Milestone5/videos/{file_name_only}_new.mp4"
|
| 69 |
new_video_path = f"CS370_Milestone5/videos/{file_name_only}_new2.mp4"
|
| 70 |
|
| 71 |
-
replace_video_audio(video_path, output_file_path, output_video_path,translated_text)
|
| 72 |
return new_video_path
|
| 73 |
|
| 74 |
def translate_text_file(input_text_path, output_text_path, source_lang='en', target_lang='fr', model_name="Helsinki-NLP/opus-mt-en-fr", batch_size=8):
|
|
|
|
| 68 |
output_video_path = f"CS370_Milestone5/videos/{file_name_only}_new.mp4"
|
| 69 |
new_video_path = f"CS370_Milestone5/videos/{file_name_only}_new2.mp4"
|
| 70 |
|
| 71 |
+
replace_video_audio(video_path, output_file_path, output_video_path,translated_text,new_video_path)
|
| 72 |
return new_video_path
|
| 73 |
|
| 74 |
def translate_text_file(input_text_path, output_text_path, source_lang='en', target_lang='fr', model_name="Helsinki-NLP/opus-mt-en-fr", batch_size=8):
|