Skip to content

Commit

Permalink
minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
siesto1elemento committed Sep 28, 2024
1 parent 42dea7c commit a4d99c4
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions cvat/apps/dataset_manager/formats/common_voice.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)):
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit a4d99c4

Please sign in to comment.