Errors with .tflite, .pbmm and .scorer

I have Raspberry Pi 3. I am running into issues when transcribing audio files.

I am using the codes provided by https://deepspeech.readthedocs.io/en/v0.7.4/

pip3 install deepspeech
curl -LO https://github.com/mozilla/DeepSpeech/releases/download/v0.7.4/deepspeech-0.7.4-models.pbmm
curl -LO https://github.com/mozilla/DeepSpeech/releases/download/v0.7.4/deepspeech-0.7.4-models.scorer
curl -LO https://github.com/mozilla/DeepSpeech/releases/download/v0.7.4/audio-0.7.4.tar.gz
tar xvf audio-0.7.4.tar.gz
deepspeech --model deepspeech-0.7.4-models.pbmm --scorer deepspeech-0.7.4-models.scorer --audio audio/2830-3980-0043.wav

Here are the outputs

pi@raspberrypi:~ $ deepspeech --model deepspeech-0.7.4-models.pbmm --scorer deepspeech-0.7.4-models.scorer --audio audio/2830-3980-0043.wav
Loading model from file deepspeech-0.7.4-models.pbmm
TensorFlow: v1.15.0-24-gceb46aa
DeepSpeech: v0.7.4-0-gfcd9563
ERROR: Model provided has model identifier ‘�A9’, should be ‘TFL3’
Error at reading model file deepspeech-0.7.4-models.pbmm
Traceback (most recent call last):
File “/home/pi/.local/bin/deepspeech”, line 10, in
sys.exit(main())
File “/home/pi/.local/lib/python3.7/site-packages/deepspeech/client.py”, line 117, in main
ds = Model(args.model)
File “/home/pi/.local/lib/python3.7/site-packages/deepspeech/init.py”, line 38, in init
raise RuntimeError(“CreateModel failed with ‘{}’ (0x{:X})”.format(deepspeech.impl.ErrorCodeToErrorMessage(status),status))
RuntimeError: CreateModel failed with ‘Failed to initialize memory mapped model.’ (0x3000)

The first issue was with the model identifier .TFL3, so I went to github https://github.com/mozilla/DeepSpeech/releases/tag/v0.7.4 and found deepspeech-0.7.4-models.tflite

curl -LO https://github.com/mozilla/DeepSpeech/releases/download/v0.7.4/deepspeech-0.7.4-models.tflite

But it didn’t work.
The second issue was reading the .pbmm file.

I ran the same exact codes on Windows and they work perfectly. I even transcribed my own .wav files. But these don’t work on my Raspberry Pi 3.

Can someone help me? Thanks for your time!

What didn’t work ? The link is good and this is what we use for testing …

1 Like

After I got deepspeech-0.7.4-models.tflite, how should I use it?
What should I change in this line?

deepspeech --model deepspeech-0.7.4-models.pbmm --scorer deepspeech-0.7.4-models.scorer --audio audio/2830-3980-0043.wav

Use .tflite file instead of .pbmm:

deepspeech --model deepspeech-0.7.4-models.tflite --scorer deepspeech-0.7.4-models.scorer --audio audio/2830-3980-0043.wav
2 Likes

oh wow. It worked! Thank you very much! You saved my day :)!!!

how to use this python api raspberry pi please anyone with clean explanation, people who already done are most welcome

Please don’t hijack old threads, delete your post and start a new thread without images.