export onnx model with “wenet/bin/export_onnx.py” and run “python test_demo.py” with exported onnx , get follow error:
Traceback (most recent call last):
File "test_demo.py", line 4, in <module>
from wenet import WenetInfer
File "/data/disk1/ybZhang/.opendir/RapidASR/python/base_wenet/wenet/__init__.py", line 2, in <module>
from .wenet_infer import WenetInfer
File "/data/disk1/ybZhang/.opendir/RapidASR/python/base_wenet/wenet/wenet_infer.py", line 37, in <module>
from swig_decoders import (PathTrie, TrieVector,
ModuleNotFoundError: No module named 'swig_decoders'
source activate wenet
(wenet) [ybZhang@master /data/disk1/ybZhang/.opendir/RapidASR/python/base_wenet]$python test_demo.py pretrain_model2/onnx_cpu/ test_data/test.wav
Traceback (most recent call last):
File "test_demo.py", line 22, in <module>
key, content, elapse = wenet_infer(wav_path)
File "/data/disk1/ybZhang/.opendir/RapidASR/python/base_wenet/wenet/wenet_infer.py", line 148, in __call__
ort_outs = self.encoder_ort_session.run(None, ort_inputs)
File "/home/ybZhang/miniconda3/envs/wenet/lib/python3.8/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 184, in run
raise ValueError("Model requires {} inputs. Input Feed contains {}".format(num_required_inputs, num_inputs))
ValueError: Model requires 6 inputs. Input Feed contains 2