Open Geosearchef opened 8 months ago
The file generated by your ipython notebook writes a magic number of:
fout.write(struct.pack("i", 0x74666C74))
The Android Java implementation checks for the presence of 0x5553454e, which is also what is present in the file in the models directory. https://github.com/nyadla-sys/whisper.tflite/blob/a7c02fdb52b06023da010063c9033152c3f84a77/whisper_android/app/src/main/java/com/whispertflite/utils/WhisperUtil.java#L82
0x5553454e
Magic number can be any four character string like "ABCD". It can be changed to your favourite string. But, need to check same string while loading vocab for validation.
The file generated by your ipython notebook writes a magic number of:
The Android Java implementation checks for the presence of
0x5553454e
, which is also what is present in the file in the models directory. https://github.com/nyadla-sys/whisper.tflite/blob/a7c02fdb52b06023da010063c9033152c3f84a77/whisper_android/app/src/main/java/com/whispertflite/utils/WhisperUtil.java#L82