k2-fsa / sherpa

Speech-to-text server framework with next-gen Kaldi
https://k2-fsa.github.io/sherpa
Apache License 2.0
534 stars 107 forks source link

error in inference zipformer framework #421

Closed alidabaghi123 closed 1 year ago

alidabaghi123 commented 1 year ago

hello. i worked with sherpa framework for zipformer streamin. some times disconned from server and show this error in terminal. why? Screenshot from 2023-07-01 14-57-18

danpovey commented 1 year ago

You should probably specify all software versions, especially torch versions and onnx versions if relevant, and the filenames of any of our uploaded models that you are using, as I suspect this may come down to a version mismatch of some kind. (But Fangjun will know better).

csukuangfj commented 1 year ago

Could you please post your complete command and all the logs?

Also, please re-check that the given tokens.txt matches your model.

alidabaghi123 commented 1 year ago

You should probably specify all software versions, especially torch versions and onnx versions if relevant, and the filenames of any of our uploaded models that you are using, as I suspect this may come down to a version mismatch of some kind. (But Fangjun will know better).

Thank you very much.

alidabaghi123 commented 1 year ago

Could you please post your complete command and all the logs?

Also, please re-check that the given tokens.txt matches your model. Screenshot from 2023-07-02 10-50-47

csukuangfj commented 1 year ago

Have you fixed it?

alidabaghi123 commented 1 year ago

Have you fixed it?

excuse me. I have updated comment.

csukuangfj commented 1 year ago

excuse me. I have updated comment.

Please post all of the logs. That is, it should contain the logs since you start streaming_server.py. The logs should contain the output of https://github.com/k2-fsa/sherpa/blob/da5a7153fa972952d2d2fd01215053d23a6ecd7b/sherpa/bin/streaming_server.py#L780


Please give us as much information as you could.

alidabaghi123 commented 1 year ago

excuse me. I have updated comment.

Please post all of the logs. That is, it should contain the logs since you start streaming_server.py. The logs should contain the output of

https://github.com/k2-fsa/sherpa/blob/da5a7153fa972952d2d2fd01215053d23a6ecd7b/sherpa/bin/streaming_server.py#L780

Please give us as much information as you could.

Screenshot from 2023-07-02 11-12-22 Screenshot from 2023-07-02 11-13-10

csukuangfj commented 1 year ago

So the log shows it indeed returns decoded results to the client but throws an error at the end.

csukuangfj commented 1 year ago

Could you change https://github.com/k2-fsa/sherpa/blob/da5a7153fa972952d2d2fd01215053d23a6ecd7b/sherpa/cpp_api/online-recognizer.cc#L189 to

std::cerr << i << ", ";
 auto sym = sym_table[i]; 
std::cerr << sym<< "\n";

and re-compile sherpa and try again?

alidabaghi123 commented 1 year ago

thank you. my problem is tokens.txt. and fixed it