whisper_android icon indicating copy to clipboard operation
whisper_android copied to clipboard

How to generate whisper tflite model

Open timlliu opened this issue 2 years ago • 4 comments

I want to generate my own model. I try : https://colab.research.google.com/github/usefulsensors/openai-whisper/blob/main/notebooks/whisper_base_tflite_model.ipynb#scrollTo=TzCrY9Q5jVsg But, it's not work for me.

timlliu avatar Feb 15 '24 03:02 timlliu

https://github.com/nyadla-sys/whisper.tflite/tree/main/models

Use script from this link to generate model.

vilassn avatar Feb 15 '24 05:02 vilassn

I use multilingual model. image

Change forced_decoder_ids to [[1, 50260], [2, 50359], [3, 50363]]. image

Output is correct. image

tflite model's output is not correct image

Am I missing something?

timlliu avatar Feb 15 '24 07:02 timlliu

i have the same problem.

https://github.com/nyadla-sys/whisper.tflite/tree/main/models i follow readme colab to generate multilingual model and replace in android sample but model is not work. and has below error msg. image

how can i get the multilingual model?

scute0001 avatar Mar 12 '24 09:03 scute0001

@timlliu If you proceed with 'monkey patch' referring to this comment, you can solve the problem that forced_decoder_ids does not apply to tflite.

https://github.com/nyadla-sys/whisper.tflite/discussions/15#discussioncomment-7362798

When converting to tflite, it seems that the specific code of the hugging face caused the problem.

yong10202 avatar Jun 10 '24 07:06 yong10202