From f6a1d168ee71431e31c552475d54b6b1c8edeef5 Mon Sep 17 00:00:00 2001 From: j Date: Fri, 24 Jan 2025 09:27:33 +0530 Subject: [PATCH] auto detect language --- transcribe.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/transcribe.py b/transcribe.py index fd3de92..564a02c 100644 --- a/transcribe.py +++ b/transcribe.py @@ -92,10 +92,13 @@ def prepare_joint_annotations(result, target_length=200): def extract_subtitles(item, user, layer, translate, gpu=False, join_sentences=False): + language = None + """ if "language" not in item.data: language = None else: language = ox.iso.langTo2Code(item.data["language"][0]) + """ if not item.streams(): logger.error("skip item without media %s: %s", item.public_id) return False