Closed craklyn closed 5 years ago
To provide another datapoint, I've tried following along in this thread. I ran the suggested docker image by following the recipe docker run -p 9999:80 jcsilva:docker-kaldi-gstreamer-server:tedlium
and the same script ran without problem. It seems that there's some difference between this image and the "current" image that's causing problems for me, but I'm not sure what's going on.
Any help is still appreciated. =] Thanks!
I think I understand what was causing my problems.
The default docker version uses the python2 library tornado==5.0.2. When this library is installed, the websocket and HTTP API don't work for me.
I've found that by installing tornado==4.3, the "Practical Example" works great. Installing is, of course, as simple as typing pip install tornado==4.3
before running the start.sh script. I do get some compilation warnings and failures when doing this, but it's good enough to get the example working.
I'll include the compilation messages below for completeness. However, I think this comment can be marked as closed. Up to the maintainers whether to make any changes to the repo. =]
root@20acfc829e7a:/opt# pip install tornado==4.3
Downloading/unpacking tornado==4.3
Downloading tornado-4.3.tar.gz (450kB): 450kB downloaded
Running setup.py (path:/tmp/pip-build-zLo_HN/tornado/setup.py) egg_info for package tornado
no previously-included directories found matching 'docs/build'
warning: no files found matching 'tornado/test/README'
Downloading/unpacking backports.ssl-match-hostname (from tornado==4.3)
Downloading backports.ssl_match_hostname-3.7.0.1.tar.gz
Running setup.py (path:/tmp/pip-build-zLo_HN/backports.ssl-match-hostname/setup.py) egg_info for package backports.ssl-match-hostname
Requirement already satisfied (use --upgrade to upgrade): singledispatch in /usr/local/lib/python2.7/dist-packages (from tornado==4.3)
Downloading/unpacking certifi (from tornado==4.3)
Downloading certifi-2018.11.29-py2.py3-none-any.whl (154kB): 154kB downloaded
Requirement already satisfied (use --upgrade to upgrade): backports-abc>=0.4 in /usr/local/lib/python2.7/dist-packages (from tornado==4.3)
Installing collected packages: tornado, backports.ssl-match-hostname, certifi
Found existing installation: tornado 5.0.2
Uninstalling tornado:
Successfully uninstalled tornado
Running setup.py install for tornado
building 'tornado.speedups' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c tornado/speedups.c -o build/temp.linux-x86_64-2.7/tornado/speedups.o
tornado/speedups.c:2:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
/tmp/pip-build-zLo_HN/tornado/setup.py:94: UserWarning:
********************************************************************
WARNING: The tornado.speedups extension module could not
be compiled. No C extensions are essential for Tornado to run,
although they do result in significant speed improvements for
websockets.
The output above this warning shows how the compilation failed.
Here are some hints for popular operating systems:
If you are seeing this message on Linux you probably need to
install GCC and/or the Python development package for your
version of Python.
Debian and Ubuntu users should issue the following command:
$ sudo apt-get install build-essential python-dev
RedHat, CentOS, and Fedora users should issue the following command:
$ sudo yum install gcc python-devel
If you are seeing this message on OSX please read the documentation
here:
http://api.mongodb.org/python/current/installation.html#osx
********************************************************************
"The output above "
command 'x86_64-linux-gnu-gcc' failed with exit status 1
no previously-included directories found matching 'docs/build'
warning: no files found matching 'tornado/test/README'
Running setup.py install for backports.ssl-match-hostname
Successfully installed tornado backports.ssl-match-hostname certifi
Cleaning up...
I can confirm that running that in /opt in the container before running start fixed this problem for me:
apt-get install build-essential python-dev
pip install tornado==4.3 --upgrade --force-reinstall
../start.sh -y /opt/models/kaldi_tuda_de_nnet3_chain2.yaml
Logs before looked like this:
2019-10-16 16:43:59 - DEBUG: __main__: 2e87035a-72c0-4b97-8e78-4063a0f5aee6: Checking that decoder hasn't been silent for more than 15 seconds
2019-10-16 16:44:00 - DEBUG: __main__: 2e87035a-72c0-4b97-8e78-4063a0f5aee6: Checking that decoder hasn't been silent for more than 15 seconds
2019-10-16 16:44:01 - DEBUG: __main__: 2e87035a-72c0-4b97-8e78-4063a0f5aee6: Checking that decoder hasn't been silent for more than 15 seconds
2019-10-16 16:44:02 - DEBUG: __main__: 2e87035a-72c0-4b97-8e78-4063a0f5aee6: Checking that decoder hasn't been silent for more than 15 seconds
2019-10-16 16:44:03 - DEBUG: __main__: 2e87035a-72c0-4b97-8e78-4063a0f5aee6: Checking that decoder hasn't been silent for more than 15 seconds
2019-10-16 16:44:04 - WARNING: __main__: 2e87035a-72c0-4b97-8e78-4063a0f5aee6: More than 15 seconds from last decoder hypothesis update, cancelling
2019-10-16 16:44:04 - INFO: __main__: 2e87035a-72c0-4b97-8e78-4063a0f5aee6: Master disconnected before decoder reached EOS?
2019-10-16 16:44:04 - INFO: decoder2: 2e87035a-72c0-4b97-8e78-4063a0f5aee6: Sending EOS to pipeline in order to cancel processing
2019-10-16 16:44:04 - INFO: decoder2: 2e87035a-72c0-4b97-8e78-4063a0f5aee6: Cancelled pipeline
2019-10-16 16:44:04 - INFO: __main__: 2e87035a-72c0-4b97-8e78-4063a0f5aee6: Waiting for EOS from decoder
2019-10-16 16:44:05 - INFO: __main__: 2e87035a-72c0-4b97-8e78-4063a0f5aee6: Waiting for EOS from decoder
2019-10-16 16:44:06 - INFO: __main__: 2e87035a-72c0-4b97-8e78-4063a0f5aee6: Waiting for EOS from decoder
2019-10-16 16:44:07 - INFO: __main__: 2e87035a-72c0-4b97-8e78-4063a0f5aee6: Waiting for EOS from decoder
2019-10-16 16:44:08 - INFO: __main__: 2e87035a-72c0-4b97-8e78-4063a0f5aee6: Waiting for EOS from decoder
[...]
2019-10-16 16:44:32 - INFO: __main__: 2e87035a-72c0-4b97-8e78-4063a0f5aee6: Waiting for EOS from decoder
2019-10-16 16:44:33 - INFO: __main__: 2e87035a-72c0-4b97-8e78-4063a0f5aee6: Waiting for EOS from decoder
2019-10-16 16:44:34 - INFO: __main__: 2e87035a-72c0-4b97-8e78-4063a0f5aee6: Giving up waiting after 31 tries
2019-10-16 16:44:34 - INFO: decoder2: 2e87035a-72c0-4b97-8e78-4063a0f5aee6: Resetting decoder state
both curl:
curl -T int5.wav http://localhost:8080/client/dynamic/recognize
and the python websocket client would just hang and not return any data.
I think this problem should be reopened since it still happens on jcsilva/docker-kaldi-gstreamer-server:latest
as of now.
I meet the same problem,your experience is very helpful to me.I fallow the step "pip install tornado==4.3" before I start the server,I work.
Hi,
I'm trying to follow the README instructions to get running a basic "hello world". In particular, I've followed the "Practical Example" at the bottom of the README file.
In broad strokes, I start the server running with the following commands:
Within a second terminal, I then run the websocket client:
Within a couple seconds of sending the command, the second terminal responds to screen
Audio sent, now sending EOS
but after this nothing happens and the terminal becomes completely unresponsive, even to ctrl+c.It looks like transcription is taking place, but the script running client.py never sees the results. Below is the full dump of worker.log. Thanks in advance for any help you can provide!