Cannot use deepspeech -e to get timestamp

Maybe I miss something, but I look at this merged pull request https://github.com/mozilla/DeepSpeech/pull/1974/files

And I updated my version to 0.5.0a5, but when I try use -e i got this error

usage: deepspeech [-h] --model MODEL --alphabet ALPHABET [--lm [LM]]
              [--trie [TRIE]] --audio AUDIO [--version]
deepspeech: error: unrecognized arguments: -e

Looks like you’re using the Python package, but the timing information is currently only exposed in the native binary, which can be found in the appropriate native_client package in the release: https://github.com/mozilla/DeepSpeech/releases/tag/v0.5.0-alpha.5

Can you please tell how to use native client package for ubuntu.I too tried -e with the code deepspeechtiming
but it didn’t worked

Can you share more details on what you do exactly ? The work from @dabinat has been merged a long time ago, but the parameter has been changed to --json.

Json/csv file is not generated. I’m getting the following output:

Loading model from file models/output_graph.pbmm
TensorFlow: v1.13.1-10-g3e0cc5374d
DeepSpeech: v0.5.0-0-g3db7a99
2019-06-12 14:23:27.366833: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2019-06-12 14:23:27.374545: E tensorflow/core/framework/op_kernel.cc:1325] OpKernel (‘op: “UnwrapDatasetVariant” device_type: “GPU” host_memory_arg: “input_handle” host_memory_arg: “output_handle”’) for unknown op: UnwrapDatasetVariant
2019-06-12 14:23:27.374579: E tensorflow/core/framework/op_kernel.cc:1325] OpKernel (‘op: “UnwrapDatasetVariant” device_type: “CPU”’) for unknown op: UnwrapDatasetVariant
2019-06-12 14:23:27.374592: E tensorflow/core/framework/op_kernel.cc:1325] OpKernel (‘op: “WrapDatasetVariant” device_type: “GPU” host_memory_arg: “input_handle” host_memory_arg: “output_handle”’) for unknown op: WrapDatasetVariant
2019-06-12 14:23:27.374602: E tensorflow/core/framework/op_kernel.cc:1325] OpKernel (‘op: “WrapDatasetVariant” device_type: “CPU”’) for unknown op: WrapDatasetVariant
Loaded model in 0.0135s.
Loading language model from files models/lm.binary models/trie
Loaded language model in 1.05s.
Running inference.
experience proof this
Inference took 1.024s for 1.975s audio file.

--json is only available on the C++ deepspeech binary. Are you using this one? I used --json no later than yesterday …

Do you have a sample C++ code that consumes native deepspeech binaries?

You can call them from the command-line. Just download the native client binary for your platform and use the following command:

deepspeech --json --model models/output_graph.pbmm --alphabet models/alphabet.txt --lm models/lm.binary --trie models/trie --audio audio.wav

Here’s how to download the command line client: https://github.com/mozilla/DeepSpeech#using-the-command-line-client

Thank you guys!

Output: {"metadata":{"confidence":31.5515},"words":[{"word":"experience","time":0.56,"duration":0.56},{"word":"proof","time":1.16,"duration":0.28},{"word":"this","time":1.48,"duration":0.0999999}]}

:+1:

I got confused about usage of native vs. python bindings. My bad.

1 Like

Plz explain it to me how to do it as I am still stuck with it and not getting the json file.I am using ubuntu and downloaded the nativeclient b using

python3 util/taskcluster.py --target .

And then i tried running this

deepspeech --json --model models/output_graph.pbmm --alphabet models/alphabet.txt --lm models/lm.binary --trie models/trie --audio audio.wav

But i am still getting this error

usage: deepspeech [-h] --model MODEL --alphabet ALPHABET [–lm [LM]]
[–trie [TRIE]] --audio AUDIO [–version] [–extended]

Plz explain it to me how to do it as I am still stuck with it and not getting the json file.I am using ubuntu and downloaded the nativeclient b using

python3 util/taskcluster.py --target .

And then i tried running this

deepspeech --json --model models/output_graph.pbmm --alphabet models/alphabet.txt --lm models/lm.binary --trie models/trie --audio audio.wav

But i am still getting this error

usage: deepspeech [-h] --model MODEL --alphabet ALPHABET [–lm [LM]]
[–trie [TRIE]] --audio AUDIO [–version] [–extended]

Plz explain it to me how to do it as I am still stuck with it and not getting the json file.I am using ubuntu and downloaded the nativeclient b using

python3 util/taskcluster.py --target .

And then i tried running this

deepspeech --json --model models/output_graph.pbmm --alphabet models/alphabet.txt --lm models/lm.binary --trie models/trie --audio audio.wav

But i am still getting this error

usage: deepspeech [-h] --model MODEL --alphabet ALPHABET [–lm [LM]]
[–trie [TRIE]] --audio AUDIO [–version] [–extended]

Please read answers above.

Hey @lissyx .I tried the steps mentioned above.But it still showing the error when I command
deepspeech --json --model models/output_graph.pbmm --alphabet models/alphabet.txt --lm models/lm.binary --trie models/trie --audio munsters.wav

deepspeech: error: unrecognized arguments: --json

It means deepspeech is not the C++ binary, but the Python. If you extracted like you did, you need to ./deepspeech