"Could not create model" when running either native or python

Getting this error even after following each step in the readme:

D:\DeepSpeech-0.6.0-alpha.11>deepspeech --model models/output_graph.pbmm --alphabet models/alphabet.txt --lm models/lm.binary --trie models/trie --audio 1.wav
TensorFlow: v1.14.0-18-g351a98ab6e
DeepSpeech: v0.6.0-alpha.11-0-gf3694ef
2019-10-30 17:27:42.146691: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
Unable to fetch metadata: Invalid argument: Session was not created with a graph before Run()!
Could not create model.

OS: Win10

Sorry if I’m doing a very noobish mistake somewhere :frowning:

@mujtabamushtaq What model are you using ?

The trained English model provided in “deepspeech-0.5.1-models.tar.gz”.

So you are mixing incompatible versions.

Ah!.. Yeah made it work. Thanks!

I have similar issue. Just installed deepspeech on windows 10 and I get this when running the example:


Unable to fetch metadata: Invalid argument: Session was not created with a graph before Run()!

Install deepspeech==0.5.1 to use the 0.5.1 model…

:confused:

@globaltommy Please don’t share console output as screenshots, it’s not searchable.

@globaltommy We added Python bindings after 0.5.1 release …

Hi @lissyx,

I have downloaded tar file of deepspeech-0.5.1 and deepspeech-0.5.1 model.

I have extracted deepspeech-0.5.1 and followed the steps.

virtualenv -p python3 $HOME/tmp/deepspeech-0.5.1-venv/

source $HOME/tmp/deepspeech-0.5.1-venv/bin/activate

pip3 install -r requirements.txt

python3 util/taskcluster.py --target .

pip3 install $(python3 util/taskcluster.py --decoder) 

then I tried to run the deepspeech from the tar file (I thin C++) not from the python binaries and i am getting following error.

./deepspeech --model /home/javi/deepspeech/deepspeech-models/output_graph.pbmm --alphabet /home/javi/deepspeech/deepspeech-models/alphabet.txt --lm /home/javi/deepspeech/deepspeech-models/lm.binary --trie /home/javi/deepspeech/deepspeech-models/trie --audio /home/javi/deepspeech/audio/2830-3980-0043.wav
TensorFlow: v1.14.0-18-g351a98a
DeepSpeech: v0.6.0-alpha.11-21-gc1da680
2019-11-21 00:17:19.576991: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
Unable to fetch metadata: Invalid argument: Session was not created with a graph before Run()!
Could not create model.

tensorflow installed which is in the requirements.txt is tensorflow 1.13.1 but while using client and check version of deepspeech (./deepspeech) looks like

TensorFlow: v1.14.0-18-g351a98a
DeepSpeech: v0.6.0-alpha.11-21-gc1da680

But deepspeech-0.5.1 needed tensorflow 1.13.1 and deepspeech 0.5.1.

What i have done wrong here? any -arch problem?

You installed v0.6.0a11.

Here, it download the matching version.

You don’t need to do all of this … Just download the 0.5.1 tarball, if you are running the C++ code you don’t need to perform the Python virtualenv setup etc etc.

I have downloaded deepspeech from this link --> https://github.com/mozilla/DeepSpeech/releases/tag/v0.5.1
I am trying to work with deepspeech client i have not installed downloaded it from git clone I know it will bring this version v0.6.0a11.

I am not using C++ , I would like to run from client deepspeech 0.5.1
FYI -> I am using ubuntu 18.04

You said the opposite earlier, that you wanted to run the C++ one.

I’m sorry but I don’t understand here.

How come you get 0.6.0a11 if you downloaded from the releases page. There’s some missing things …

1 Like

If you want the python client 0.5.1, just follow the documented steps. pip should install the latest stable version when you pip install deepspeech. You can always force the version with pip install deepspeech==0.5.1.

If you are running only inference, this is not required (and we don’t document this)

Same, this is not needed

Same, this only has value if you are training.

1 Like

I am trying to get timestamps from the wav file. That is available only in client.

./deepspeech --model /home/javi/deepspeech/deepspeech-models/output_graph.pbmm --alphabet /home/javi/deepspeech/deepspeech-models/alphabet.txt --lm /home/javi/deepspeech/deepspeech-models/lm.binary --trie /home/javi/deepspeech/deepspeech-models/trie --audio /home/javi/deepspeech/audio/2830-3980-0043.wav --json

So I am installing client.

Sorry, but what are you talking about ?

Timestamps are more useful for programmatic usages, it’s exposed in the API …

Sorry for confusing. I am talking about native binary referring this forum Cannot use deepspeech -e to get timestamp

To get the timestamps

Well, I’ve already replied to all of that.

1 Like

Thank you, @lissyx. The problem i have is when i download zip from https://github.com/mozilla/DeepSpeech/releases/tag/v0.5.1

and run --> python3 util/taskcluster.py --target .
It is downloading
TensorFlow: v1.14.0-18-g351a98a
DeepSpeech: v0.6.0-alpha.11-21-gc1da680

It is not downloading based on my branch and arch, It fetching from master branch.

Here is the command which i am running

DeepSpeech-0.5.1  DeepSpeech-0.5.1.tar.gz
jargon-javi@thinkpad-e470:~/speech$ git clone https://github.com/mozilla/DeepSpeech.git
Cloning into 'DeepSpeech'...
remote: Enumerating objects: 46, done.
remote: Counting objects: 100% (46/46), done.
remote: Compressing objects: 100% (37/37), done.
remote: Total 14687 (delta 16), reused 24 (delta 7), pack-reused 14641
Receiving objects: 100% (14687/14687), 46.23 MiB | 4.49 MiB/s, done.
Resolving deltas: 100% (9724/9724), done.
jargon-javi@thinkpad-e470:~/speech$ cd DeepSpeech
jargon-javi@thinkpad-e470:~/speech/DeepSpeech$ git checkout v0.5.1
Note: checking out 'v0.5.1'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at 4b29b78 Bump version to 0.5.1
jargon-javi@thinkpad-e470:~/speech/DeepSpeech$ git branch
* (HEAD detached at v0.5.1)
  master
jargon-javi@thinkpad-e470:~/speech/DeepSpeech$ python3 util/taskcluster.py --target .
Downloading https://index.taskcluster.net/v1/task/project.deepspeech.deepspeech.native_client.master.cpu/artifacts/public/native_client.tar.xz ...
Downloading: 100%

generate_trie
libdeepspeech.so
LICENSE
deepspeech
deepspeech.h
README.mozilla
jargon-javi@thinkpad-e470:~/speech/DeepSpeech$ ./deepspeech --version
TensorFlow: v1.14.0-18-g351a98a
DeepSpeech: v0.6.0-alpha.11-21-gc1da680