Open mdundek opened 7 years ago
Hi,
it seems everything is all right... could you confirm if you are running the docker in the same machine you are running the client.py?
Also, if possible, try it: https://github.com/jcsilva/docker-kaldi-gstreamer-server/tree/master/examples/practical-example
I did the test from the host machine that runs the container. The script works when I run it from within the running docker container on port 80. Looks like there is a problem with the port mapping 8080:80. Not sure what I am doing wrong here...
Quick question beside this pb. The script prints out the text at the pace of the recorded audio file. Is there a way to accelerate this? Using the HTTP REST endpoint maybe (http://localhost:8888/client/dynamic/recognize)?
Thanks in advance,
Michael
Interesting your problem with the port mapping... I've never faced it... would it be possible you configured some rule in your iptable and it is causing the problem? It's a guess... and I have no idea. But I would like to learn about your solution :)
About your question, I imagine you just want to receive the recognition result and you don't want to get the partial results in your application, right? If it is the point, you just have to use the responses with the field "final" equals to "true", ignoring all responses in which final==false
About accelerating the recognition time, it is possible. But I discourage it. You should have to change some decoding parameters, and it will damage your recognition accuracy. Usually you would "fail faster" and it would produce useless results.
I have the same problem. A few month ago, I can use it normally. But today I try to use it again, this problem appear. I don't know what leads to the problem.
bump same here in 2018. I have everything running and got stuck because the client py wont connect. Any suggestions?
Okay everything works as expected. I followed the tutorial and tried everything directly. I just needed to reboot, I guess that actually set the app-amor rules for docker correctly.
Additionally, for people running into the same error: please check if you have a VPN running, my VPN blocked the connection to localhost for instance. Maybe this can go into the docs somehow.
Hi @warp1337, thanks for your comments. I've never tried to use this in a VPN and I could not reproduce the error here. I think it might be useful to be somewhere in the doc. Would you like to write something explaining the details and make a PR?
Can do. But this will take a while. I add this on my todo list.
Hi, I am using the tutorial and everything is working fine as far as running both master and worker in the same container using the following. docker run -it -p 8080:80 -v /media/kaldi_models:/opt/models jcsilva/docker-kaldi-gstreamer-server:latest /bin/bash and then inside the container launched worker /opt/start.sh -y /opt/model/nnet.yaml
But if I run 2 docker instances on the same machine, first one using the command docker run -it -p 8080:80 -v /media/kaldi_models:/opt/models jcsilva/docker-kaldi-gstreamer-server:latest /bin/bash
and the second one using docker run -it -v /media/kaldi_models:/opt/models jcsilva/docker-kaldi-gstreamer-server:latest /bin/bash
and running worker inside the second container /opt/start.sh -y /opt/model/nnet.yaml -m first-container -p 8080
the client is unable to connect. Remember both containers are on the same machine. What am I doing wrong?
I guess you forgot to forward the port from the second container, thus you have no endpoint to connect to.
forward as in with IPTables or some docker conf?
@salisaim, are you able to ping "first-container" from your second container?
yeap! first container is able to ping the IPaddress of the second one. If I get you correctly you are referring to internal network 172.x.x.x
Just to be sure we are aligned ... when you enter in your second container (where there is only a recognition worker) and send a ping to your first container (where your master server is located) everything goes fine, right?
But, if you enter in your second container and execute /opt/start.sh -y /opt/model/nnet.yaml -m IP_ADDRESS_OF_MASTER_CONTAINER -p 8080 nothing happens, right?
Could you paste your master log file from the first container and worker log file from your second container?
Hey I have it running - Totally bad on my part - appologies - I messed up running only a worker on master. Once I looked into the start.sh script. I realized master isn't up . jcsilva your mention of looking closely got me wondering and i found out that I am not starting the master in standalone mode properly.
Thanks guys - so conclusion is below. We have a clean install (Centos instance on AWS, running 2 docker containers, identical images). Every things works fine. (no routing changes, no IPTABLE entries). I simple started my master in container manually, not using the start script. On the other container started the worker with start-script and (-m MASTER_IP) (-p MASTER_PORT) flag. and it worked.
Thanks Guys
Hello,
First of all, huge thank you for this docker image. I really appreciate you sharing this with the community, you deserve lot's of credits for this.
I do have an issue when testing my setup. When I use the test command from my host:
python /tmp/client.py -u ws://localhost:8080/client/ws/speech -r 8192 /tmp/bill_gates-TED.mp3
Nothing happens, the process just stays stuck and I have to kill it manually. If I do wait for long enough, I get the following error:
Here is my worker.log file after the above attempt:
I followed your instructions to the letter, did I miss something?
Just in case, here is my master.log file as well
I started the Docker image as such:
It looks like I am almost there, any suggestions would be very much appreciated.
Thanks,
Michael