sherpa-onnx icon indicating copy to clipboard operation
sherpa-onnx copied to clipboard

refactor and pybind of OnlineWebsocketServer

Open manickavela29 opened this issue 9 months ago • 6 comments

Hi @csukuangfj ,

I have refactored the previous implementation, Below code base is functional tested and cleaned up

I think you can suggest more for naming for more clarity or clean up.

overall summary, -- refactoring online-websocket-server -- pybind interface -- signal termination, graceful shut down

Thanks

closed https://github.com/k2-fsa/sherpa-onnx/pull/1931

manickavela29 avatar Feb 28 '25 17:02 manickavela29

Hi @csukuangfj, could you approve for workflows, meanwhile you get time into review, it will give me ample time to fix any failures

manickavela29 avatar Mar 04 '25 02:03 manickavela29

Have you compiled and tested it locally?

Does it build successfully and also run successfully for you?

csukuangfj avatar Mar 04 '25 02:03 csukuangfj

yes, it is functional in my local testing with CUDA provider,

when I raised PR, observed that for some android build, it was failing with '#include "asio"', so wanted to fix such issues meanwhile

manickavela29 avatar Mar 04 '25 02:03 manickavela29

it was failing with '#include "asio"',

In that case, I suggest that you move the online-websocket-server.cc to sherpa-onnx/python/csrc. It is better to not make sherpa-onnx-core contain websocket related stuff.

note that move there means you can change sherpa-onnx/python/csrc/CMakeLists.txt to include that .cc file. You don't need to move that file physically to that folder.

csukuangfj avatar Mar 04 '25 03:03 csukuangfj

I have moved the WebSocket file to python/src object file and cleaned it, let me know if it is good enough

manickavela29 avatar Mar 04 '25 13:03 manickavela29

Thanks for the suggestions, I will address them this week.

manickavela29 avatar Mar 24 '25 05:03 manickavela29