vilassn / whisper_android

Offline Speech Recognition with OpenAI Whisper and TensorFlow Lite for Android
MIT License
192 stars 28 forks source link

How to fix error version tensorflow lite ? #2

Closed ITHealer closed 10 months ago

ITHealer commented 10 months ago

"E/tflite: Model provided has model identifier 'ion ', should be 'TFL3'"

thanks!

vilassn commented 10 months ago

@ITHealer When did you get this error? Are you able to compile the code for Android.? Do you get this error at runtime or compile time?

ITHealer commented 10 months ago

@ITHealer When did you get this error? Are you able to compile the code for Android.? Do you get this error at runtime or compile time?

I did not edit anything in your source code. I can compile the code for android. However, when I run the project, my Android screen is white and I can't do anything. Below is an image of the logcat segment displayed continuously.

image

vilassn commented 10 months ago

@ITHealer please check model size in assets folder. It should be around 40mb. If it is not, the problem can be due to git lfs. Install git lfs and reclone the project.

ITHealer commented 10 months ago

@ITHealer please check model size in assets folder. It should be around 40mb. If it is not, the problem can be due to git lfs. Install git lfs and reclone the project.

I did as you suggested but still the same error occurs.

vilassn commented 10 months ago

@ITHealer Can you please share below details.

  1. Target device details
  2. Android OS version

Also, I will share apk after sometime if it is the problem due to compilation on your side.

ITHealer commented 10 months ago

@ITHealer Can you please share below details.

  1. Target device details
  2. Android OS version

Also, I will share apk after sometime if it is the problem due to compilation on your side.

Yep,

  1. Target device details: --> Xiaomi Redmi Note 5 (API 28)

    1. Android OS version: --> Android 9

    2. Below is the log I received: (When I start loading the model, this phenomenon occurs)


    2023-10-20 17:40:57.589 2080-3618 system_server system_server E Failed to open APK '/data/app/com.whispertflite-Lz80gpFKZQ6_cgWoD6aCaw==/base.apk' I/O error 2023-10-20 17:40:57.589 2080-3618 ResourcesManager system_server E failed to add asset path /data/app/com.whispertflite-Lz80gpFKZQ6_cgWoD6aCaw==/base.apk 2023-10-20 17:40:57.590 2080-3618 system_server system_server E Failed to open APK '/data/app/com.whispertflite-Lz80gpFKZQ6_cgWoD6aCaw==/base.apk' I/O error 2023-10-20 17:40:57.590 2080-3618 ResourcesManager system_server E failed to add asset path /data/app/com.whispertflite-Lz80gpFKZQ6_cgWoD6aCaw==/base.apk 2023-10-20 17:40:57.590 2080-3618 system_server system_server E Failed to open APK '/data/app/com.whispertflite-Lz80gpFKZQ6_cgWoD6aCaw==/base.apk' I/O error 2023-10-20 17:40:57.590 2080-3618 ResourcesManager system_server E failed to add asset path /data/app/com.whispertflite-Lz80gpFKZQ6_cgWoD6aCaw==/base.apk 2023-10-20 17:40:59.999 7305-7305 Perf com.whispertflite I Connecting to perf service. 2023-10-20 17:41:00.035 7305-7305 m.whispertflit com.whispertflite W Accessing hidden field Landroid/os/Trace;->TRACE_TAG_APP:J (light greylist, reflection) 2023-10-20 17:41:00.035 7305-7305 m.whispertflit com.whispertflite W Accessing hidden method Landroid/os/Trace;->isTagEnabled(J)Z (light greylist, reflection) 2023-10-20 17:41:00.195 7305-7305 AppCompatDelegate com.whispertflite D Checking for metadata for AppLocalesMetadataHolderService : Service not found 2023-10-20 17:41:00.250 7305-7305 m.whispertflit com.whispertflite W Accessing hidden field Landroid/graphics/Insets;->left:I (light greylist, linking) 2023-10-20 17:41:00.251 7305-7305 m.whispertflit com.whispertflite W Accessing hidden field Landroid/graphics/Insets;->top:I (light greylist, linking) 2023-10-20 17:41:00.251 7305-7305 m.whispertflit com.whispertflite W Accessing hidden field Landroid/graphics/Insets;->right:I (light greylist, linking) 2023-10-20 17:41:00.251 7305-7305 m.whispertflit com.whispertflite W Accessing hidden field Landroid/graphics/Insets;->bottom:I (light greylist, linking) 2023-10-20 17:41:00.408 7305-7305 m.whispertflit com.whispertflite W Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (light greylist, reflection) 2023-10-20 17:41:00.411 7305-7305 m.whispertflit com.whispertflite W Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (light greylist, reflection) 2023-10-20 17:41:00.465 7305-7305 m.whispertflit com.whispertflite W Accessing hidden method Landroid/widget/PopupWindow;->setClipToScreenEnabled(Z)V (light greylist, reflection) 2023-10-20 17:41:00.465 7305-7305 m.whispertflit com.whispertflite W Accessing hidden method Landroid/widget/PopupWindow;->setEpicenterBounds(Landroid/graphics/Rect;)V (light greylist, reflection) 2023-10-20 17:41:01.364 7305-7305 MainActivity com.whispertflite D Returned asset path: /data/user/0/com.whispertflite/files/whisper-tiny.tflite 2023-10-20 17:41:01.364 7305-7305 MainActivity com.whispertflite D Returned asset path: /data/user/0/com.whispertflite/files/filters_vocab_multilingual.bin 2023-10-20 17:41:01.645 7305-7305 tflite com.whispertflite E Model provided has model identifier 'ion ', should be 'TFL3' 2023-10-20 17:41:03.082 7456-7456 Perf com.whispertflite I Connecting to perf service. 2023-10-20 17:41:03.100 7456-7456 m.whispertflit com.whispertflite W Accessing hidden field Landroid/os/Trace;->TRACE_TAG_APP:J (light greylist, reflection) 2023-10-20 17:41:03.100 7456-7456 m.whispertflit com.whispertflite W Accessing hidden method Landroid/os/Trace;->isTagEnabled(J)Z (light greylist, reflection) 2023-10-20 17:41:03.224 7456-7456 AppCompatDelegate com.whispertflite D Checking for metadata for AppLocalesMetadataHolderService : Service not found 2023-10-20 17:41:03.250 7456-7456 m.whispertflit com.whispertflite W Accessing hidden field Landroid/graphics/Insets;->left:I (light greylist, linking) 2023-10-20 17:41:03.250 7456-7456 m.whispertflit com.whispertflite W Accessing hidden field Landroid/graphics/Insets;->top:I (light greylist, linking) 2023-10-20 17:41:03.250 7456-7456 m.whispertflit com.whispertflite W Accessing hidden field Landroid/graphics/Insets;->right:I (light greylist, linking) 2023-10-20 17:41:03.250 7456-7456 m.whispertflit com.whispertflite W Accessing hidden field Landroid/graphics/Insets;->bottom:I (light greylist, linking) 2023-10-20 17:41:03.398 7456-7456 m.whispertflit com.whispertflite W Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (light greylist, reflection) 2023-10-20 17:41:03.403 7456-7456 m.whispertflit com.whispertflite W Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (light greylist, reflection) 2023-10-20 17:41:03.444 7456-7456 m.whispertflit com.whispertflite W Accessing hidden method Landroid/widget/PopupWindow;->setClipToScreenEnabled(Z)V (light greylist, reflection) 2023-10-20 17:41:03.444 7456-7456 m.whispertflit com.whispertflite W Accessing hidden method Landroid/widget/PopupWindow;->setEpicenterBounds(Landroid/graphics/Rect;)V (light greylist, reflection) 2023-10-20 17:41:03.563 7456-7456 MainActivity com.whispertflite D Returned asset path: /data/user/0/com.whispertflite/files/whisper-tiny.tflite 2023-10-20 17:41:03.564 7456-7456 MainActivity com.whispertflite D Returned asset path: /data/user/0/com.whispertflite/files/filters_vocab_multilingual.bin 2023-10-20 17:41:03.745 7456-7456 tflite com.whispertflite E Model provided has model identifier 'ion ', should be 'TFL3'

-> Can you share apk file ?

Thank you so much for supporting me!

ITHealer commented 10 months ago

@ITHealer Can you please share below details.

  1. Target device details
  2. Android OS version

Also, I will share apk after sometime if it is the problem due to compilation on your side.

Do you have any solution?

vilassn commented 10 months ago

@ITHealer I have shared apk and demo video in release folder. Please check whether you face any issue with this apk .

https://github.com/vilassn/whisper_android/tree/master/release

ITHealer commented 10 months ago

@ITHealer I have shared apk and demo video in release folder. Please check whether you face any issue with this apk .

https://github.com/vilassn/whisper_android/tree/master/release

You just updated something and now I have it running successfully!

Thanks!!!

ITHealer commented 10 months ago

@ITHealer I have shared apk and demo video in release folder. Please check whether you face any issue with this apk .

https://github.com/vilassn/whisper_android/tree/master/release

I want to know the root cause. Has the use of a multilingual model influenced this?

vilassn commented 10 months ago

@ITHealer I do not face any issue while using multilingual or English only model. Checkout latest code and Try using it from your side.

ITHealer commented 10 months ago

@ITHealer I do not face any issue while using multilingual or English only model. Checkout latest code and Try using it from your side.

Thanks you!

I have another question to ask you. How to using VAD in project android? Can you guide me how to use that code in Android source code?

Thank you very much!!

vilassn commented 10 months ago

@ITHealer Oh, I am still working on adding VAD (Voice Activity Detection) support. Please keep in touch for further updates.

vilassn commented 10 months ago

Original issue got fixed