|
|
3 tahun lalu | |
|---|---|---|
| .. | ||
| models | 3 tahun lalu | |
| utils | 3 tahun lalu | |
| README.md | 3 tahun lalu | |
| __init__.py | 3 tahun lalu | |
| export_model.py | 3 tahun lalu | |
| test_onnx.py | 3 tahun lalu | |
| test_torchscripts.py | 3 tahun lalu | |
funasr 0.1.7
python 3.7
torch 1.11.0
modelscope 1.2.0
The installation is the same as funasr
Export model from modelscope
from funasr.export.export_model import ASRModelExportParaformer
output_dir = "../export" # onnx/torchscripts model save path
export_model = ASRModelExportParaformer(cache_dir=output_dir, onnx=True)
export_model.export('damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch')
Export model from local path
export_model.export('/root/cache/export/damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch')
Export model from modelscope
from funasr.export.export_model import ASRModelExportParaformer
output_dir = "../export" # onnx/torchscripts model save path
export_model = ASRModelExportParaformer(cache_dir=output_dir, onnx=False)
export_model.export('damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch')
Export model from local path
export_model.export('/root/cache/export/damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch')