Error when running inference on an audio file

DeepSpeech: v0.1.1

I have created the lm.binary and trie by following the steps which is similar to this:

@lissyx Please let me know if you would need anyother info, which i may have missed.

This is my versions of other libraries which i have installed in a virtualenv:
absl-py==0.1.11
asn1crypto==0.24.0
backports.functools-lru-cache==1.5
backports.weakref==1.0.post1
bcrypt==3.1.4
beautifulsoup4==4.6.0
bleach==1.5.0
bs4==0.0.1
certifi==2018.1.18
cffi==1.11.5
chardet==3.0.4
cryptography==2.1.4
cycler==0.10.0
deepspeech==0.1.1
enum34==1.1.6
funcsigs==1.0.2
futures==3.2.0
html5lib==0.9999999
idna==2.6
ipaddress==1.0.19
kiwisolver==1.0.1
Markdown==2.6.11
matplotlib==2.2.0
mock==2.0.0
numpy==1.14.1
pandas==0.22.0
paramiko==2.4.0
pbr==3.1.1
progressbar2==3.36.0
protobuf==3.5.2
pyasn1==0.4.2
pycparser==2.18
PyNaCl==1.2.1
pyparsing==2.2.0
pysftp==0.2.9
python-dateutil==2.6.1
python-speech-features==0.6
python-utils==2.3.0
pytz==2018.3
pyxdg==0.26
requests==2.18.4
scipy==1.0.0
six==1.11.0
sox==1.3.2
subprocess32==3.2.7
tensorflow==1.5.0
tensorflow-tensorboard==1.5.1
urllib3==1.22
webrtcvad==2.0.10
Werkzeug==0.14.1

Thanks in advance

Can you try with native client from https://queue.taskcluster.net/v1/task/JccCd5JKTsqnucg_sknLnQ/runs/0/artifacts/public/native_client.tar.xz ?
Keep the same trained network, just update your client. I’m wondering if you are not hitting something because of training with v1.5.0 and running inference with earlier version: DeepSpeech v0.1.1 is r1.4-based.

@lissyx is this native client for mac os ?? it is giving me error.
Where can i find the binary for mac os ??

Thanks

That’s for Linux, but you can grab an OSX one at https://tools.taskcluster.net/groups/PrzjPY-ITSK6cn9x4yr3yg/tasks/U4tyZPPEQS6bZ5RHRyORFA/runs/0/artifacts

@lissyx which one from that above link do i download ?? because the previous link you had shared has the entire tar with all so files etc

pick public/native_client.tar.xz if you want the C++ client

@lissyx when i install this using this:

python util/taskcluster.py --arch osx --target .

it looks like it is downloading from:
https://index.taskcluster.net/v1/task/project.deepspeech.deepspeech.native_client.master.osx/artifacts/public/native_client.tar.xz

So this client is the older version having 1.4 is it ??

and which libraries version are you referring to here ??

Thanks

This command will download from latest master, use the link I gave you.

@lissyx nope still the same error.

But if i run this command on the prebuilt model which we get from this:
wget -O - https://github.com/mozilla/DeepSpeech/releases/download/v0.1.1/deepspeech-0.1.1-models.tar.gz | tar xvfz -

it works.

Only when i have built my own model i get this error.

Can you make sure you ran the C++ client ? I suspect you are still referring to the Python module. Can you precisely document your steps to run ?

‘identical_element_shapes is something that has been added recently, I think r1.5. That’s likely why you are running into that issue.

@lissyx Sorry for that miss from my side.
I used the c++ client now, but am getting this error:

Reading alphabet.txt ----5---10---15---20---25---30---35---40---45---50---55---60---65---70---75---80---85---90---95--100 libc++abi.dylib: terminating with uncaught exception of type lm::FormatLoadException: native_client/kenlm/lm/read_arpa.cc:65 in void lm::ReadARPACounts(util::FilePiece &, std::vector<uint64_t> &) threw FormatLoadException. first non-empty line was "a" not \data\. Byte: 218

Ok, that’s my fault, I forgot to tell you that WAV argument has been moved to the end :). So try: ./deepspeech output_graph.pb alphabet.txt ../testing_sampling/out.wav

1 Like

@lissyx Thanks it works now.

Just curious as to what is this version you are talking about ?? is it deepspeech version ??
Also is c++ binary different in the way it works from the python one ??

No, the C++ binary mostly equivalent to what you have in Python. The version I’m referring to is the one that is embedded in the packages / tarball. It’s the TensorFlow version we used to build.

So the python project is built with 1.5 is it ??
But the native client is not updated for python ??

No, it’s about what has been released to PyPI/npm and what we have on TaskCluster. Latest version “released” is v0.1.1, based on r1.4. But newer binaries are available from TaskCluster. It will be updated on PyPI/NPM when we do a new release.

Got it. Thanks for patiently helping me out :slight_smile:

1 Like

@lissyx I face a similar problem.

just this mng, created a new topic ( Pip install deepspeech throws error while serving model trained on TF 1.6 ) , and later stumbled upon this topic… linked this topic there.

Can you please make the python deepspeech library whl corresponding to the latest taskcluster binaries available? I need to use in deepspeech-server internally.

Thank you very much!

I don’t understand your request, the wheel are also provided on TaskCluster: https://tools.taskcluster.net/index/project.deepspeech.deepspeech.native_client.master/cpu

It’s still versionned as 0.1.1 but it’s latest master.

I had the same problem, but now when i run it,

terminal output:

Loading model from file output_graph.pb
2018-04-04 11:57:19.772386: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
Loaded model in 0.271s.
Loading language model from files 5-gram.binary quz_trie
Loaded language model in 0.699s.
Running inference.
2018-04-04 11:57:23.228952: E tensorflow/core/framework/op_segment.cc:53] Create kernel failed: Invalid argument: NodeDef mentions attr ‘identical_element_shapes’ not in Op<name=TensorArrayV3; signature=size:int32 -> handle:resource, flow:float; attr=dtype:type; attr=element_shape:shape,default=; attr=dynamic_size:bool,default=false; attr=clear_after_read:bool,default=true; attr=tensor_array_name:string,default=""; is_stateful=true>; NodeDef: bidirectional_rnn/bw/bw/TensorArray_1 = TensorArrayV3clear_after_read=true, dtype=DT_FLOAT, dynamic_size=false, element_shape=[?,4096], identical_element_shapes=true, tensor_array_name=“bidirectional_rnn/bw/bw/dynamic_rnn/input_0”, _device="/job:localhost/replica:0/task:0/device:CPU:0". (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.).
2018-04-04 11:57:23.229242: E tensorflow/core/common_runtime/executor.cc:643] Executor failed to create kernel. Invalid argument: NodeDef mentions attr ‘identical_element_shapes’ not in Op<name=TensorArrayV3; signature=size:int32 -> handle:resource, flow:float; attr=dtype:type; attr=element_shape:shape,default=; attr=dynamic_size:bool,default=false; attr=clear_after_read:bool,default=true; attr=tensor_array_name:string,default=""; is_stateful=true>; NodeDef: bidirectional_rnn/bw/bw/TensorArray_1 = TensorArrayV3clear_after_read=true, dtype=DT_FLOAT, dynamic_size=false, element_shape=[?,4096], identical_element_shapes=true, tensor_array_name=“bidirectional_rnn/bw/bw/dynamic_rnn/input_0”, _device="/job:localhost/replica:0/task:0/device:CPU:0". (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.).
[[Node: bidirectional_rnn/bw/bw/TensorArray_1 = TensorArrayV3clear_after_read=true, dtype=DT_FLOAT, dynamic_size=false, element_shape=[?,4096], identical_element_shapes=true, tensor_array_name=“bidirectional_rnn/bw/bw/dynamic_rnn/input_0”, _device="/job:localhost/replica:0/task:0/device:CPU:0"]]
Error running session: Invalid argument: NodeDef mentions attr ‘identical_element_shapes’ not in Op<name=TensorArrayV3; signature=size:int32 -> handle:resource, flow:float; attr=dtype:type; attr=element_shape:shape,default=; attr=dynamic_size:bool,default=false; attr=clear_after_read:bool,default=true; attr=tensor_array_name:string,default=""; is_stateful=true>; NodeDef: bidirectional_rnn/bw/bw/TensorArray_1 = TensorArrayV3clear_after_read=true, dtype=DT_FLOAT, dynamic_size=false, element_shape=[?,4096], identical_element_shapes=true, tensor_array_name=“bidirectional_rnn/bw/bw/dynamic_rnn/input_0”, _device="/job:localhost/replica:0/task:0/device:CPU:0". (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.).
[[Node: bidirectional_rnn/bw/bw/TensorArray_1 = TensorArrayV3clear_after_read=true, dtype=DT_FLOAT, dynamic_size=false, element_shape=[?,4096], identical_element_shapes=true, tensor_array_name=“bidirectional_rnn/bw/bw/dynamic_rnn/input_0”, _device="/job:localhost/replica:0/task:0/device:CPU:0"]]
None
Inference took 2.494s for 1.117s audio file.

help me plz…