| | |
| | | # vad_model="iic/speech_fsmn_vad_zh-cn-16k-common-pytorch", |
| | | # vad_model_revision="master", |
| | | # vad_kwargs={"max_single_segment_time": 2000}, |
| | | hub="ms", # "ms" or "modelscope" for Mainland China users; "hf" or "huggingface" for Other overseas users |
| | | ) |
| | | |
| | | wav_file = f"{model.model_path}/example/test.wav" |
| | |
| | | |
| | | def download_model(**kwargs): |
| | | hub = kwargs.get("hub", "ms") |
| | | if hub == "ms": |
| | | if hub == "ms" or hub == "modelscope": |
| | | kwargs = download_from_ms(**kwargs) |
| | | elif hub == "hf": |
| | | elif hub == "hf" or hub == "huggingface": |
| | | kwargs = download_from_hf(**kwargs) |
| | | elif hub == "openai": |
| | | model_or_path = kwargs.get("model") |