Android tflite model inference issues

I still get a segmentation fault with this updated library. below is the result.

./deepspeech --model models/output_graph.tflite --alphabet models/alphabet.txt --audio models/ted1_mod.wav -t
DeepSpeech: v0.4.1-9-g45504f6
Segmentation fault (core dumped)

Right, well, I’m sorry, but at this point, I don’t see what I can do more, I really don’t have time to reproduce your specific env, and it’s not our targets.

Can’t you share some logcat output to give us some hints?

Attached it the logcat output. logcat_deepspeech_crash_01112019.zip (72.3 KB)

What is the arm64 based HW that you are using to test it? is it a general purpose development kit?

It’s a Google Pixel 2 device, running Android 9.0, and we have CI testing covering Android 7.0 and 7.1 on ARMv7 and ARM64 with the native client.

01-17 16:05:52.114  2229  2229 F DEBUG   : backtrace:
01-17 16:05:52.114  2229  2229 F DEBUG   :     #00 pc 00236700  /data/user/libdeepspeech.so
01-17 16:05:52.114  2229  2229 F DEBUG   :     #01 pc 00230711  /data/user/libdeepspeech.so
01-17 16:05:52.114  2229  2229 F DEBUG   :     #02 pc 00018d69  /data/user/libdeepspeech.so (DS_CreateModel(char const*, unsigned int, unsigned int, char const*, unsigned int, ModelState**)+296)
01-17 16:05:52.114  2229  2229 F DEBUG   :     #03 pc 00002165  /data/user/deepspeech
01-17 16:05:52.114  2229  2229 F DEBUG   :     #04 pc 0007932d  /system/lib/libc.so (__libc_init+48)
01-17 16:05:52.114  2229  2229 F DEBUG   :     #05 pc 00001d78  /data/user/deepspeech

@sranjeet.visteon Can you try this one? it should have debug info, maybe it can give us a better hint looking at logcat ?libdeepspeech.armv7.zip (1.5 MB)

Attached is the report with the new library with debug information.deepspeech_crash_01112019_1133am.zip (2.5 KB)

Ok, it’s not giving more informations.

Could you share the taskcluster output of arm64, so that I can give it a try with a different android system running on an arm64?

https://tools.taskcluster.net/index/project.deepspeech.deepspeech.native_client.master/android-arm64

At some point, it might be even easier if ARM64 does not help that you build and hack native_client/deepspeech.cc yourself, to see where the segfault happens, it’s not that much work.

@lissyx I tried on a different arm64 system running Android 8.1 but the result was the same segmentation fault. Is the tflite model that you have exported using the steps mentioned in https://github.com/mozilla/DeepSpeech#exporting-a-model-for-tflite? I also find the size of the tflite model generated to be same as that of the .pbmm model, is this the expectation?

Yes and yes. What’s this ARM64 system ?

This is Qualcomm 820AM HW.

Can you share your tflite file ?

And can you test with this one https://queue.taskcluster.net/v1/task/RICASSXvSvOPCSFafStlKg/runs/0/artifacts/public/output_graph.tflite ?

Yes this works. My tflite model is around 180MB in size equivalent to the size of the .pbmm file that was part of the 0.4.1 release.

Please share it, because re-exporting 0.4.1 woks well for me.

I could not upload the file here, so added it in dropbox https://www.dropbox.com/s/e2r75ry74wpemd5/output_graph.zip?dl=0

Well, at least I reproduce the issue myself now …