mirror of
https://github.com/modelscope/FunASR
synced 2025-09-15 14:48:36 +08:00
* Make emotion2vec exportable to onnx * Make export_meta of emotion2vec consistence with other models * Include layer norm in the exported onnx model
11 lines
348 B
Python
11 lines
348 B
Python
# method2, inference from local path
|
|
from funasr import AutoModel
|
|
|
|
model = AutoModel(
|
|
model="iic/emotion2vec_base",
|
|
hub="ms"
|
|
)
|
|
|
|
res = model.export(type="onnx", quantize=False, opset_version=13, device='cpu') # fp32 onnx-gpu
|
|
# res = model.export(type="onnx_fp16", quantize=False, opset_version=13, device='cuda') # fp16 onnx-gpu
|