Fix translation from foreign languages.

This commit is contained in:
McCloudS committed 2025-02-14 14:59:20 +00:00
1 parent 9abe77f0b1
commit 3a1c26294c
1 file changed
+2 -7
+2 -7
View File
@@ -1,4 +1,4 @@
subgen_version = '2025.02.72'
subgen_version = '2025.02.73'
from language_code import LanguageCode
from datetime import datetime
@@ -1068,11 +1068,7 @@ def gen_subtitles_queue(file_path: str, transcription_type: str, force_language:
logging.debug(f"{file_path} doesn't have any audio to transcribe!")
return
if transcription_type == 'translate':
force_language = LanguageCode.from_string('eng')
# if we are translating, then we must do it to english only
else:
force_language = choose_transcribe_language(file_path, force_language)
force_language = choose_transcribe_language(file_path, force_language)
# check if we would like to detect audio language in case of no audio language specified. Will return here again with specified language from whisper
if not force_language and should_whiser_detect_audio_language:
@@ -1082,7 +1078,6 @@ def gen_subtitles_queue(file_path: str, transcription_type: str, force_language:
logging.debug(f"Added to queue: {task['path']} [Type: {task.get('type', 'transcribe')}]")
return
if should_skip_file(file_path, force_language):
return