Spaces:
Running
on
Zero
Running
on
Zero
artificialguybr
commited on
Commit
•
902b7eb
1
Parent(s):
43edaa1
Update app.py
Browse files
app.py
CHANGED
@@ -50,7 +50,9 @@ def process_video(video, high_quality, target_language):
|
|
50 |
result = model.transcribe("output_audio_final.wav")
|
51 |
whisper_text = result["text"]
|
52 |
whisper_language = result['language']
|
53 |
-
|
|
|
|
|
54 |
language_mapping = {'English': 'en', 'Spanish': 'es', 'French': 'fr', 'German': 'de', 'Italian': 'it', 'Portuguese': 'pt', 'Polish': 'pl', 'Turkish': 'tr', 'Russian': 'ru', 'Dutch': 'nl', 'Czech': 'cs', 'Arabic': 'ar', 'Chinese (Simplified)': 'zh-cn'}
|
55 |
target_language_code = language_mapping[target_language]
|
56 |
translator = Translator()
|
|
|
50 |
result = model.transcribe("output_audio_final.wav")
|
51 |
whisper_text = result["text"]
|
52 |
whisper_language = result['language']
|
53 |
+
|
54 |
+
print(whisper_text)
|
55 |
+
|
56 |
language_mapping = {'English': 'en', 'Spanish': 'es', 'French': 'fr', 'German': 'de', 'Italian': 'it', 'Portuguese': 'pt', 'Polish': 'pl', 'Turkish': 'tr', 'Russian': 'ru', 'Dutch': 'nl', 'Czech': 'cs', 'Arabic': 'ar', 'Chinese (Simplified)': 'zh-cn'}
|
57 |
target_language_code = language_mapping[target_language]
|
58 |
translator = Translator()
|