auto detect language
This commit is contained in:
parent
97adec9538
commit
f6a1d168ee
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue