WARNING: libdeepspeech failed to load, resorting to deprecated code Refer to README.md for instructions on installing libdeepspeech.
Hi Guys, I followed the instructions to install deepspeech. Dowloaded native_client tar and extracted in tensorflow virtualenv /bin directory. Installed tensorflow using pip in virtualenv. When I run ./bin/run-ldc93s1.sh --decoder_library_path /root/tensorflowve/bin/native_client/native_client/libctc_decoder_with_kenlm.so. I get WARNING: libdeepspeech failed to load, resorting to deprecated code Refer to README.md for instructions on installing libdeepspeech.
But it completes training with result - I WER: 0.181818, loss: 3.539721, mean edit distance: 0.019231 I - src: "she had your dark suit in greasy wash water all year" I - res: "she had your dark suit in greasy wash water allyear"
I am using ubuntu on docker. What is this warning about "libdeepspeech failed to load". How can I fix it ?
Can you provide more details exactly on what you did when you say "extracted in tensorflow virtualenv /bin". Also, you should install our tensorflow, not upstream's one.
The warning is because libdeepspeech_utils.so could not be loaded.
Basically I have tensorflow virtual env at ~/tensorflowve. And I copied contents of native_client tar to ~/tensorflowve/bin/native_client/ And ls -l output is as below:
(tensorflowve)root@4c0f3bcb55fd:/work# ls -l ~/tensorflowve/bin/native_client/ total 104852 -rw-r--r-- 1 root root 16725 Oct 24 07:34 LICENSE -rw-r--r-- 1 root root 398 Oct 24 07:34 README.mozilla -rwxr-xr-x 1 root root 14226 Oct 24 07:34 deepspeech -r-xr-xr-x 1 root root 230408 Oct 24 07:34 generate_trie -r-xr-xr-x 1 root root 818240 Oct 24 07:34 libctc_decoder_with_kenlm.so -r-xr-xr-x 1 root root 799512 Oct 24 07:34 libdeepspeech.so -r-xr-xr-x 1 root root 26336 Oct 24 07:34 libdeepspeech_utils.so -r-xr-xr-x 1 root root 105439256 Oct 24 07:34 libtensorflow_cc.so
I tried adding content of native_client tar to /usr/local/bin but still the same output.
This is not how it is supposed to work. You can extract whereever you want, however, you will need the Python bindings installed, and those should have access to libdeepspeech_utils.so, so make sure it is in the linker's search path (LD_LIBRARY_PATH).
Hi, I am seeing the same problem. Trying to run DeepSpeech in a docker container. The .so files are in the native_client directory and the directory is listed in the LD_LIBRARY_PATH. Still the warning pops up when I run ldc93s1.sh What am I missing?
root@671db1f8c980:/home/docsdocker/projects/DeepSpeech# ls native_client BUILD beam_search.h client.py definitions.mk libctc_decoder_with_kenlm.so package.json Makefile boost_locale deepspeech.cc generate_trie.cpp libdeepspeech.so python README.md c_speech_features deepspeech.h javascript libdeepspeech_utils.so setup.cfg alphabet.h client.cc deepspeech_utils.cc kenlm libtensorflow_cc.so setup.py beam_search.cc client.js deepspeech_utils.h kiss_fft130 multistrap.conf trie_node.h
root@671db1f8c980:/home/docsdocker/projects/DeepSpeech# echo $LD_LIBRARY_PATH /home/docsdocker/projects/DeepSpeech/native_client:/usr/local/nvidia/lib:/usr/local/nvidia/lib64
root@671db1f8c980:/home/docsdocker/projects/DeepSpeech# ./bin/run-ldc93s1.sh
- [ ! -f DeepSpeech.py ]
- [ ! -f data/ldc93s1/ldc93s1.csv ]
- [ -d ]
- python -c from xdg import BaseDirectory as xdg; print(xdg.save_data_path("deepspeech/ldc93s1"))
- checkpoint_dir=/root/.local/share/deepspeech/ldc93s1
- python -u DeepSpeech.py --train_files data/ldc93s1/ldc93s1.csv --dev_files data/ldc93s1/ldc93s1.csv --test_files data/ldc93s1/ldc93s1.csv --train_batch_size 1 --dev_batch_size 1 --test_batch_size 1 --n_hidden 494 --epoch 50 --checkpoint_dir /root/.local/share/deepspeech/ldc93s1 W Parameter --validation_step needs to be >0 for early stopping to work
WARNING: libdeepspeech failed to load, resorting to deprecated code Refer to README.md for instructions on installing libdeepspeech
I Test of Epoch 50 - WER: 0.272727, loss: 2.79828643799, mean edit distance: 0.038462 I -------------------------------------------------------------------------------- I WER: 0.272727, loss: 2.798286, mean edit distance: 0.038462 I - src: "she had your dark suit in greasy wash water all year" I - res: "she had your dark suit in greasy was water allyear" I --------------------------------------------------------------------------------
@zemravi As I just explained above, you also need to install the Python bindings.
The below dockerfile finally worked for me for cpu version
FROM ubuntu:16.04
ENV GIT_LFS_VER=2.1.1
ENV TENSORFLOW_WARPCTC_WHL_URL=https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.master.cpu/artifacts/public/tensorflow_warpctc-1.3.0rc0-cp27-cp27mu-linux_x86_64.whl
ENV NATIVE_CLIENT_URL=https://index.taskcluster.net/v1/task/project.deepspeech.deepspeech.native_client.master.cpu/artifacts/public/native_client.tar.xz
ENV DEEPSPEECH_WHL_URL=https://index.taskcluster.net/v1/task/project.deepspeech.deepspeech.native_client.master.cpu/artifacts/public/deepspeech-0.0.1-cp27-cp27mu-linux_x86_64.whl
WORKDIR /tmp
## Install the basic things
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
curl \
git \
python-pip \
python-dev \
python-numpy python-scipy python-matplotlib ipython ipython-notebook python-pandas python-sympy python-nose \
&& apt-get install -y \
build-essential \
libssl-dev \
libffi-dev \
wget \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
## Install git-lfs
RUN curl -L https://github.com/git-lfs/git-lfs/releases/download/v$GIT_LFS_VER/git-lfs-linux-amd64-$GIT_LFS_VER.tar.gz \
| tar xvzf - \
&& git-lfs-$GIT_LFS_VER/install.sh \
&& rm -rf git-lfs-$GIT_LFS_VER
## Install all the python packages
RUN pip install --upgrade pip \
&& pip install --upgrade \
setuptools \
&& pip install --upgrade \
$TENSORFLOW_WARPCTC_WHL_URL \
pyxdg \
python_speech_features \
sox \
pandas
WORKDIR /work/
RUN git clone https://github.com/mozilla/DeepSpeech \
&& cd DeepSpeech \
&& pip install -r requirements.txt
RUN wget $NATIVE_CLIENT_URL -P /tmp \
&& cd /tmp \
&& tar -xJvf native_client.tar.xz \
&& cp -r *.so /work/DeepSpeech/native_client/
RUN export LD_LIBRARY_PATH=/work/DeepSpeech/native_client
RUN pip install $DEEPSPEECH_WHL_URL
WORKDIR DeepSpeech
After that before running set LD_LIBRARY_PATH export LD_LIBRARY_PATH=/work/DeepSpeech/native_client
Unfortunately for gpu version I could not find deepspeech and tensorflow warpctc whl files on taskcluster @lissyx , can you please point me to those links so that I can try gpu version also ?
Tensorflow GPU is at: https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.master.gpu/artifacts/public/tensorflow_gpu_warpctc-1.3.0rc0-cp27-cp27mu-linux_x86_64.whl
The GPU version of native_client is at https://index.taskcluster.net/v1/task/project.deepspeech.deepspeech.native_client.master.gpu/artifacts/public/native_client.tar.xz
And you should be able to keep the same Python bindings.
:)) thanks. Sorry.. my mistake. forgot to install the bindings
Seems like this was fixed.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.