Skip to content
This repository has been archived by the owner on Aug 28, 2023. It is now read-only.

Loading the model #20

Open
Mukish45 opened this issue Feb 12, 2023 · 7 comments
Open

Loading the model #20

Mukish45 opened this issue Feb 12, 2023 · 7 comments

Comments

@Mukish45
Copy link

Mukish45 commented Feb 12, 2023

Hello @nyadla-sys. You did a great job on making the whisper model working on Android. I'm also trying with the same, but struggling to load and run the inference using C/C++ library. I have tried to load the model, but the application crashes. Could you please share any references on setting up those C/C++ libraries.

@nyadla-sys
Copy link
Contributor

nyadla-sys commented Feb 12, 2023 via email

@Mukish45
Copy link
Author

Mukish45 commented Feb 13, 2023

@nyadla-sys Is there any other alternative ways to run whisper model on android without using C++ libraries?

@nyadla-sys
Copy link
Contributor

@Mukish45 Definitely, the app can be run using Java APIs, but I am not an expert in writing Android applications

@Mukish45
Copy link
Author

@nyadla-sys Is it possible to transcript using whisper model on mobile. Eg: If I spoke in German, I should get its English translated text. Is it possible in mobile app?

@nyadla-sys
Copy link
Contributor

Yes it is possible you need to use to different tflite model for translate in Android App

refer the below comments from this thread #15
This also might be of interest to you @nyadla-sys The base model do translation to english where as the tiny and small models just returned the language detected.

mycroft@OpenVoiceOS-e3830c:~/whisper $ minimal models/whisper-tiny.tflite de_speech_thorsten_sample03_8s.wav

n_vocab:50257

mel.n_len3000

mel.n_mel:80
INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
Inference time 7 seconds

[_extra_token_50258][_extra_token_50261][_extra_token_50359][BEG] Für mich sind alle Menschen gleich unabhängig von Geschlecht, sexuelle Orientierung, Religion, Hautfarbe oder Geo-Kordinaten der Geburt.[SOT]

mycroft@OpenVoiceOS-e3830c:~/whisper $ minimal models/whisper-base.tflite de_speech_thorsten_sample03_8s.wav

n_vocab:50257

mel.n_len3000

mel.n_mel:80
INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
Inference time 12 seconds

[_extra_token_50258][_extra_token_50261][_extra_token_50358][BEG] For me, all people are equally independent

@nyadla-sys
Copy link
Contributor

Actually some one is trying to implement multilanguage(transcribe and translate) support on Android APP using TFLite models

Refer the below code for more details..

https://github.com/ipsilondev/whisper-cordova/blob/main/android/cpp/native-lib.cpp

@Mukish45
Copy link
Author

Thank you @nyadla-sys for your quick response also for sharing reference.

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

No branches or pull requests

2 participants