Spaces:
Running
Running
adding portuguese
Browse filesadding portuguese by request
app.py
CHANGED
@@ -27,7 +27,7 @@ def video_to_translate(file_obj,initial_language,final_language):
|
|
27 |
elif initial_language == "Japanese":
|
28 |
lang_in='ja-JP'
|
29 |
elif final_language == "Portuguese":
|
30 |
-
lang_in='pt'
|
31 |
# open the file
|
32 |
with sr.AudioFile("test.wav") as source:
|
33 |
# listen for the data (load audio to memory)
|
@@ -48,7 +48,7 @@ def video_to_translate(file_obj,initial_language,final_language):
|
|
48 |
elif final_language == "Japanese":
|
49 |
lang='ja'
|
50 |
elif initial_language == "Portuguese":
|
51 |
-
lang='pt
|
52 |
print(lang)
|
53 |
# init the Google API translator
|
54 |
translator = Translator()
|
|
|
27 |
elif initial_language == "Japanese":
|
28 |
lang_in='ja-JP'
|
29 |
elif final_language == "Portuguese":
|
30 |
+
lang_in='pt-BR'
|
31 |
# open the file
|
32 |
with sr.AudioFile("test.wav") as source:
|
33 |
# listen for the data (load audio to memory)
|
|
|
48 |
elif final_language == "Japanese":
|
49 |
lang='ja'
|
50 |
elif initial_language == "Portuguese":
|
51 |
+
lang='pt'
|
52 |
print(lang)
|
53 |
# init the Google API translator
|
54 |
translator = Translator()
|