File size: 875 Bytes
bbf29cf |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
#!/usr/bin/env python3
# Please first run
# pip install modelscope
# See https://www.modelscope.cn/models/damo/speech_paraformer-large-vad-punc_asr_nat-zh-cn-16k-common-vocab8404-onnx/file/view/master/quickstart.md
from modelscope.hub.file_download import model_file_download
files = [
"model_quant.onnx",
"am.mvn",
"config.yaml",
"configuration.json",
]
for f in files:
model_dir = model_file_download(
# model_id="damo/speech_paraformer-large-vad-punc_asr_nat-zh-cn-16k-common-vocab8404-onnx",
model_id="damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch",
file_path=f,
# revision="v1.2.4",
)
print(model_dir)
# /Users/fangjun/.cache/modelscope/hub/damo/speech_paraformer-large-vad-punc_asr_nat-zh-cn-16k-common-vocab8404-onnx/model_quant.onnx
#
# mv model_quant.onnx model.int8.onnx
|