Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to generate whisper tflite model #7

Open
timlliu opened this issue Feb 15, 2024 · 4 comments
Open

How to generate whisper tflite model #7

timlliu opened this issue Feb 15, 2024 · 4 comments

Comments

@timlliu
Copy link

timlliu commented Feb 15, 2024

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.

@vilassn
Copy link
Owner

vilassn commented Feb 15, 2024

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

Use script from this link to generate model.

@timlliu
Copy link
Author

timlliu commented Feb 15, 2024

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?

@scute0001
Copy link

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?

@yong10202
Copy link

yong10202 commented Jun 10, 2024

@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.

nyadla-sys/whisper.tflite#15 (comment)

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants