| | |
| | | import os |
| | | import json |
| | | from omegaconf import OmegaConf |
| | | from omegaconf import OmegaConf, DictConfig |
| | | |
| | | from funasr.download.name_maps_from_hub import name_maps_ms, name_maps_hf, name_maps_openai |
| | | |
| | |
| | | kwargs["frontend_conf"]["cmvn_file"] = os.path.join(model_or_path, "am.mvn") |
| | | if os.path.exists(os.path.join(model_or_path, "jieba_usr_dict")): |
| | | kwargs["jieba_usr_dict"] = os.path.join(model_or_path, "jieba_usr_dict") |
| | | if isinstance(kwargs, OmegaConf): |
| | | if isinstance(kwargs, DictConfig): |
| | | kwargs = OmegaConf.to_container(kwargs, resolve=True) |
| | | return kwargs |
| | | |