diff --git a/cvat/apps/dataset_manager/formats/common_voice.py b/cvat/apps/dataset_manager/formats/common_voice.py index bc525c91cd8e..1e6be783ded1 100644 --- a/cvat/apps/dataset_manager/formats/common_voice.py +++ b/cvat/apps/dataset_manager/formats/common_voice.py @@ -39,22 +39,6 @@ def load_anno(file_object, annotations): label_name = record.get("label") label_id = label_data._get_label_id(label_name) - language_id_to_locale_mapping = { - 0: "en-US", - 1: "es-ES", - 2: "fr-FR", - 3: "zh-CN", - 4: "hi-IN", - 5: "ar-EG", - 6: "pt-BR", - 7: "ja-JP", - 8: "de-DE", - 9: "ru-RU", - } - - # defaults to -1 if language field not in tsv, locale will be an empty string - language_id = int(record.get("language", -1)) - attributes = [] for i in range(1, len(headers)): @@ -89,7 +73,7 @@ def load_anno(file_object, annotations): "transcript": record.get("sentence", ""), "gender": record.get("gender", ""), "age": record.get("age", ""), - "locale": language_id_to_locale_mapping.get(language_id, ""), + "locale": record.get("locale", ""), "accent": record.get("accents", ""), "emotion": record.get("emotion", ""), "rotation": 0.0,