alumae / kaldi-gstreamer-server

Real-time full-duplex speech recognition server, based on the Kaldi toolkit and the GStreamer framwork.
BSD 2-Clause "Simplified" License
1.07k stars 341 forks source link

Does this work with Python 3 #139

Open wuhufeirenxin opened 6 years ago

wuhufeirenxin commented 6 years ago

I‘m trying to use python 3, Python 3.5.2 on Ubuntu16.04.2 for specific.

After modifying some module name. The server and worker are ready.

However, the socket seems to be closed right after the first message is received by work. Attached some log here: DEBUG 2018-07-05 14:54:23,135 (gx_worker.py:received_message():108) : Got message from server of type <class 'ws4py.messaging.TextMessage'> in State 1. INFO 2018-07-05 14:54:23,136 (gx_worker.py:received_message():109) self.STATE_CONNECTED: 1. DEBUG 2018-07-05 14:54:23,136 (gx_worker.py:closed():190) : Websocket closed() called INFO 2018-07-05 14:54:23,136 (gx_worker.py:finish_request():156) : enter finish_request, State is 1. INFO 2018-07-05 14:54:23,136 (gx_worker.py:finish_request():159) : enter finish_request, State is STATE_CONNECTED. INFO 2018-07-05 14:54:23,136 (gx_decoder2.py:finish_request():174) : Resetting decoder state INFO 2018-07-05 14:54:23,137 (gx_decoder2.py:finish_request():180) : Done setting pipline state. DEBUG 2018-07-05 14:54:23,137 (gx_worker.py:closed():192) : Websocket closed() finished INFO 2018-07-05 14:54:23,138 (gx_worker.py:main_loop():395) After run_forever(). INFO 2018-07-05 14:54:24,139 (gx_decoder2.py:set_eos_handler():272) : Setting eos handler. INFO 2018-07-05 14:54:24,139 (gx_worker.py:init():76) : init() done; State is 0. INFO 2018-07-05 14:54:24,139 (gx_worker.py:main_loop():392) Opening websocket connection to master server INFO 2018-07-05 14:54:24,146 (gx_worker.py:opened():79) Opened websocket connection to server INFO 2018-07-05 14:54:24,146 (gx_worker.py:opened():82) : After opened, state is 1.

alumae commented 6 years ago

It's a bit embarrassing but I'm afraid it's not compatible with Python 3. It's definitely on my TODO list as I also want to move to Python 3, but I cannot give any time estimate.

wuhufeirenxin commented 6 years ago

All right. I am trying to make it work on Python 3. I'll let u known if I make it. The good news is that the problem above is due to a bug of my own, while the bad news is there is some other problem after I fix the above one.

FredericGodin commented 5 years ago

Any update on this?

denialhaq commented 2 years ago

I am also curious about this.

sirifarif commented 2 years ago

@denialhaq did you try the py3 branch

denialhaq commented 2 years ago

Hi @sirifarif,

I just try the branch, when i run the master_server.py i got this error

# python3 kaldigstserver/master_server.py --port=8100
Traceback (most recent call last):
  File "kaldigstserver/master_server.py", line 18, in <module>
    from Queue import Queue
ModuleNotFoundError: No module named 'Queue'