jcsilva / docker-kaldi-gstreamer-server

Dockerfile for kaldi-gstreamer-server.
BSD 2-Clause "Simplified" License
288 stars 139 forks source link

Cannot run Practical Example #56

Open taomanwai opened 5 years ago

taomanwai commented 5 years ago

Inside worker.log , it is found:

Failed to send event to master: Cannot send on a terminated websocket

Why?

Background:

  1. I run client using "python /hdd/tommy/tmp/client.py -u ws://localhost:8080/client/ws/speech -r 8192 /hdd/tommy/tmp/bill_gates-TED.mp3"

  2. Status is RESPONSE: {"num_workers_available": 1, "num_requests_processed": 5}

  3. In worker.log, recognised text result is found in worker log, but it seems it cannot be returned from worker back to master, and then back to client.

Thanks in advance

taomanwai commented 5 years ago

Something similar to this: https://github.com/alumae/kaldi-gstreamer-server/issues/161

But audios are using EN only, no Chinese

virus2016 commented 5 years ago

Hi there,

I have the same issue. I have successfully created the docker image however workers spawn and die?

  'Supervisord is running as root and it is searching '
2019-02-19 14:53:38,829 CRIT Supervisor running as root (no user in config file)
2019-02-19 14:53:38,829 WARN Included extra file "/etc/supervisor/conf.d/supervisord.conf" during parsing
2019-02-19 14:53:38,842 INFO RPC interface 'supervisor' initialized
2019-02-19 14:53:38,843 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2019-02-19 14:53:38,843 INFO supervisord started with pid 1
2019-02-19 14:53:39,845 INFO spawned: 'worker' with pid 9
2019-02-19 14:53:39,847 INFO spawned: 'master' with pid 10
2019-02-19 14:53:41,260 INFO success: worker entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-02-19 14:53:41,261 INFO success: master entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-02-19 14:53:47,614 INFO exited: worker (terminated by SIGKILL; not expected)
2019-02-19 14:53:47,629 CRIT reaped unknown pid 13)
2019-02-19 14:53:48,640 INFO spawned: 'worker' with pid 14
2019-02-19 14:53:50,248 INFO success: worker entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-02-19 14:53:56,603 INFO exited: worker (terminated by SIGKILL; not expected)
2019-02-19 14:53:56,618 CRIT reaped unknown pid 15)
2019-02-19 14:53:57,632 INFO spawned: 'worker' with pid 16
2019-02-19 14:53:59,258 INFO success: worker entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-02-19 14:54:05,836 INFO exited: worker (terminated by SIGKILL; not expected)
2019-02-19 14:54:05,868 CRIT reaped unknown pid 17)
2019-02-19 14:54:06,886 INFO spawned: 'worker' with pid 18
2019-02-19 14:54:08,137 INFO success: worker entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

Could you tell me if I have gone wrong somewhere?

gsingers commented 5 years ago

Same here. I know I've had this working in the past. I think my main difference now is I'm using Python 3. I have made some updates to the Client example to get it send in Py3, and I can see the transcriptions happening on the server in the worker, but it's not coming out properly.

leakyH commented 5 years ago

I had the same issue due to an AttributeError in client.py, so it forced to shutdown the websocket connection, while without notifing the worker, so the worker is still trying to pour something to the closed websocket.

You can checkout if the client accidently crashs. For me the reason is in this line, the trans returned by worker is proved be a list, not a str. So maybe the solution in https://github.com/alumae/kaldi-gstreamer-server/issues/161 works, not noly for the reason of Chinese decoding, but also an AttributeError.(I guess)

BUT what confused me most is that I checked the worker.py in this docker, it seems that a small change has been attached to this line: 2019-07-15 14-01-33 的屏幕截图 left:in the docker -------------------- right: in the kaldi-gstreamer-server repo So with the server and worker in the docker, my client(without conmments) still works very well, because the message returned by the worker(in the docker) is a str, not a list. I first saw your comment in the kaldi-gstreamer-server repo, and sudenly find this issue is in the docker repo, so I wonder if you still have the same problem when using the docker? Or you copied the server file into the docker?