deepspeech2-online-decoder icon indicating copy to clipboard operation
deepspeech2-online-decoder copied to clipboard

How to keep websocket server alive?

Open kouohhashi opened this issue 4 years ago • 3 comments

Hi, Thank you for great work. And I have a few questions.

Every time one transcribe is done connection seems to be disconnected. Could you give me a hist to make the server connected. I could not figure out where to change...

Screen Shot 2020-08-13 at 12 29 49 PM

All I did was just clone deepSpeech and copy everything on this repository. Environment is local, mac os.

kouohhashi avatar Aug 13 '20 03:08 kouohhashi

You are most probably using the latest version of Deepspeech2 implementation which has been changed a lot!

I forked the project and started building my own version. You can find it here: https://github.com/farisalasmary/deepspeech.pytorch

farisalasmary avatar Nov 10 '20 06:11 farisalasmary

@kouohhashi I found this pull request in the websocket implementation repo that I'm using in this project. You may find it useful https://github.com/Pithikos/python-websocket-server/pull/70

farisalasmary avatar Nov 21 '20 02:11 farisalasmary

I am getting same issue. ( Continuation Frames ) . Note i am using it without lzstring compression (so my byte array sizes are prety huge). Did you find any fix for this ?

from wesocketserver.py

FIN = 0x80 OPCODE = 0x0 MASKED = 0x80 PAYLOAD_LEN = 0x7f PAYLOAD_LEN_EXT16 = 0x7e PAYLOAD_LEN_EXT64 = 0x7f

OPCODE_CONTINUATION = 0x0 OPCODE_TEXT = 0x1 OPCODE_BINARY = 0x2 OPCODE_CLOSE_CONN = 0x8 OPCODE_PING = 0x9 OPCODE_PONG = 0xA

iThink setting OPCODE to OPCODE_CONTINUATION = 0x0 might help

naveenss1995 avatar Dec 11 '20 11:12 naveenss1995