wenet
wenet copied to clipboard
python performance issues
The python interface provided by wenet can only be executed in a single thread, right? The original C++ code needs to load and read the model every time a Decoder object is created. It does not support creating multiple Decoders in the same thread. If I want to support multi-threading, I should How to modify?
You need make the decoder to have the function of copying like feature pipeline etc, by the way, the model can be multi-threaded
Every time this Recognizer is created, the model must be loaded once. If multiple recognizers are created, there will be multiple copies of the model in the memory. It takes time to read the model, and the model itself takes up memory.
The interface provided by python is called Decoder. This decoder does not support multi-threading for different recognition tasks at the same time, so I want to create multiple Decoders for concurrent recognition, but this will make an error
python 的 decoder不支持同时多线程处理不同的识别任务,我这也遇到这样的问题,具体报错信息如下:
Error: cannot set number of interop threads after parallel work has started or set_num_interop_threads called
现在有好的解决办法吗
please try c++ runtime, which natively support multi-thread