whisper_android icon indicating copy to clipboard operation
whisper_android copied to clipboard

How To Generate the vocab filters bin file

Open rabyunghwa opened this issue 9 months ago • 4 comments

Really good project! How is the vocab filters bin file generated? Is there a tutorial?

rabyunghwa avatar Mar 08 '25 13:03 rabyunghwa

I think, this was used to build it. https://github.com/nyadla-sys/whisper.tflite/blob/main/models/tflt_vocab_mel.ipynb

woheller69 avatar Mar 12 '25 05:03 woheller69

@woheller69 Thank you! I didn't know it could be so complicated on Android. Do you know why it is used when calculating the log-Mel Spectrogram values? My model is a non-English one and it's not working correctly as it always outputs gibberish. Do you happen to know how to debug such issues? Thanks in advance!

rabyunghwa avatar Mar 12 '25 14:03 rabyunghwa

There is also some stuff here: https://github.com/openai/whisper/tree/main/whisper/assets

I do not know a lot about it. I did not change that part of code in my project.

But here you can see what to do with a non-English = multi-lingual model:

https://github.com/woheller69/whisperIME/blob/master/app/src/main/java/com/whispertflite/utils/WhisperUtil.java

Did you create the model on your own? You can find some models and info here: https://huggingface.co/DocWolle/whisper_tflite_models/tree/main

woheller69 avatar Mar 12 '25 15:03 woheller69

Thank you for the info! I'll check them out later. My model is a fine-tuned variant of the Whisper-small model on some accented speech data. It seems that it's rather complicated to calculate the Mel-spectrogram values on Android. With python, a few lines of code would suffice. I'm especially confused about why a vocab filter is needed here.

On Wed, Mar 12, 2025, 11:26 PM woheller69 @.***> wrote:

There is also some stuff here: https://github.com/openai/whisper/tree/main/whisper/assets

I do not know a lot about it. I did not change that part of code in my project.

But here you can see what to do with a non-English = multi-lingual model:

https://github.com/woheller69/whisperIME/blob/master/app/src/main/java/com/whispertflite/utils/WhisperUtil.java

Did you create the model on your own? You can find some models and info here: https://huggingface.co/DocWolle/whisper_tflite_models/tree/main

— Reply to this email directly, view it on GitHub https://github.com/vilassn/whisper_android/issues/31#issuecomment-2718266684, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABYRNONV2J7XNUBF5UFX6EL2UBG23AVCNFSM6AAAAABYTBPEPGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOMJYGI3DMNRYGQ . You are receiving this because you authored the thread.Message ID: @.***> [image: woheller69]woheller69 left a comment (vilassn/whisper_android#31) https://github.com/vilassn/whisper_android/issues/31#issuecomment-2718266684

There is also some stuff here: https://github.com/openai/whisper/tree/main/whisper/assets

I do not know a lot about it. I did not change that part of code in my project.

But here you can see what to do with a non-English = multi-lingual model:

https://github.com/woheller69/whisperIME/blob/master/app/src/main/java/com/whispertflite/utils/WhisperUtil.java

Did you create the model on your own? You can find some models and info here: https://huggingface.co/DocWolle/whisper_tflite_models/tree/main

— Reply to this email directly, view it on GitHub https://github.com/vilassn/whisper_android/issues/31#issuecomment-2718266684, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABYRNONV2J7XNUBF5UFX6EL2UBG23AVCNFSM6AAAAABYTBPEPGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOMJYGI3DMNRYGQ . You are receiving this because you authored the thread.Message ID: @.***>

rabyunghwa avatar Mar 12 '25 15:03 rabyunghwa