123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138 |
- import os
- voice_to_gender_dict = {
- "v2/en_speaker_0": "Male",
- "v2/en_speaker_1": "Male",
- "v2/en_speaker_2": "Male",
- "v2/en_speaker_3": "Male",
- "v2/en_speaker_4": "Male",
- "v2/en_speaker_5": "Male",
- "v2/en_speaker_6": "Male",
- "v2/en_speaker_7": "Male",
- "v2/en_speaker_8": "Male",
- "v2/en_speaker_9": "Female",
- "v2/zh_speaker_0": "Male",
- "v2/zh_speaker_1": "Male",
- "v2/zh_speaker_2": "Male",
- "v2/zh_speaker_3": "Male",
- "v2/zh_speaker_4": "Female",
- "v2/zh_speaker_5": "Male",
- "v2/zh_speaker_6": "Female",
- "v2/zh_speaker_7": "Female",
- "v2/zh_speaker_8": "Male",
- "v2/zh_speaker_9": "Female",
- "v2/fr_speaker_0": "Male",
- "v2/fr_speaker_1": "Female",
- "v2/fr_speaker_2": "Female",
- "v2/fr_speaker_3": "Male",
- "v2/fr_speaker_4": "Male",
- "v2/fr_speaker_5": "Female",
- "v2/fr_speaker_6": "Male",
- "v2/fr_speaker_7": "Male",
- "v2/fr_speaker_8": "Male",
- "v2/fr_speaker_9": "Male",
- "v2/de_speaker_0": "Male",
- "v2/de_speaker_1": "Male",
- "v2/de_speaker_2": "Male",
- "v2/de_speaker_3": "Female",
- "v2/de_speaker_4": "Male",
- "v2/de_speaker_5": "Male",
- "v2/de_speaker_6": "Male",
- "v2/de_speaker_7": "Male",
- "v2/de_speaker_8": "Female",
- "v2/de_speaker_9": "Male",
- "v2/hi_speaker_0": "Female",
- "v2/hi_speaker_1": "Female",
- "v2/hi_speaker_2": "Male",
- "v2/hi_speaker_3": "Female",
- "v2/hi_speaker_4": "Female",
- "v2/hi_speaker_5": "Male",
- "v2/hi_speaker_6": "Male",
- "v2/hi_speaker_7": "Male",
- "v2/hi_speaker_8": "Male",
- "v2/hi_speaker_9": "Female",
- "v2/it_speaker_0": "Male",
- "v2/it_speaker_1": "Male",
- "v2/it_speaker_2": "Female",
- "v2/it_speaker_3": "Male",
- "v2/it_speaker_4": "Male",
- "v2/it_speaker_5": "Male",
- "v2/it_speaker_6": "Male",
- "v2/it_speaker_7": "Female",
- "v2/it_speaker_8": "Male",
- "v2/it_speaker_9": "Female",
- "v2/ja_speaker_0": "Female",
- "v2/ja_speaker_1": "Female",
- "v2/ja_speaker_2": "Male",
- "v2/ja_speaker_3": "Female",
- "v2/ja_speaker_4": "Female",
- "v2/ja_speaker_5": "Female",
- "v2/ja_speaker_6": "Male",
- "v2/ja_speaker_7": "Female",
- "v2/ja_speaker_8": "Female",
- "v2/ja_speaker_9": "Female",
- "v2/ko_speaker_0": "Female",
- "v2/ko_speaker_1": "Male",
- "v2/ko_speaker_2": "Male",
- "v2/ko_speaker_3": "Male",
- "v2/ko_speaker_4": "Male",
- "v2/ko_speaker_5": "Male",
- "v2/ko_speaker_6": "Male",
- "v2/ko_speaker_7": "Male",
- "v2/ko_speaker_8": "Male",
- "v2/ko_speaker_9": "Male",
- "v2/pl_speaker_0": "Male",
- "v2/pl_speaker_1": "Male",
- "v2/pl_speaker_2": "Male",
- "v2/pl_speaker_3": "Male",
- "v2/pl_speaker_4": "Female",
- "v2/pl_speaker_5": "Male",
- "v2/pl_speaker_6": "Female",
- "v2/pl_speaker_7": "Male",
- "v2/pl_speaker_8": "Male",
- "v2/pl_speaker_9": "Female",
- "v2/pt_speaker_0": "Male",
- "v2/pt_speaker_1": "Male",
- "v2/pt_speaker_2": "Male",
- "v2/pt_speaker_3": "Male",
- "v2/pt_speaker_4": "Male",
- "v2/pt_speaker_5": "Male",
- "v2/pt_speaker_6": "Male",
- "v2/pt_speaker_7": "Male",
- "v2/pt_speaker_8": "Male",
- "v2/pt_speaker_9": "Male",
- "v2/ru_speaker_0": "Male",
- "v2/ru_speaker_1": "Male",
- "v2/ru_speaker_2": "Male",
- "v2/ru_speaker_3": "Male",
- "v2/ru_speaker_4": "Male",
- "v2/ru_speaker_5": "Female",
- "v2/ru_speaker_6": "Female",
- "v2/ru_speaker_7": "Male",
- "v2/ru_speaker_8": "Male",
- "v2/ru_speaker_9": "Female",
- "v2/es_speaker_0": "Male",
- "v2/es_speaker_1": "Male",
- "v2/es_speaker_2": "Male",
- "v2/es_speaker_3": "Male",
- "v2/es_speaker_4": "Male",
- "v2/es_speaker_5": "Male",
- "v2/es_speaker_6": "Male",
- "v2/es_speaker_7": "Male",
- "v2/es_speaker_8": "Female",
- "v2/es_speaker_9": "Female",
- "v2/tr_speaker_0": "Male",
- "v2/tr_speaker_1": "Male",
- "v2/tr_speaker_2": "Male",
- "v2/tr_speaker_3": "Male",
- "v2/tr_speaker_4": "Female",
- "v2/tr_speaker_5": "Female",
- "v2/tr_speaker_6": "Male",
- "v2/tr_speaker_7": "Male",
- "v2/tr_speaker_8": "Male",
- "v2/tr_speaker_9": "Male",
- }
- def get_speaker_gender(history_prompt: str):
- return voice_to_gender_dict.get(history_prompt.replace(os.path.sep, "/"), "Unknown")
|