-
Notifications
You must be signed in to change notification settings - Fork 27
How to use whisper-small.tflite? #25
Comments
OK.I replace filters_vocab_gen.bin with filters_vocab_multilingual.bin |
I found that the result was translated into English. Can I control not to translate? |
Can you try whisper-medium.tflite which may work for transcribe,however single models has some issues with multilanguage transcribe. Please see some comments below about transcribe and translation feature thanks for your information and I will look into it 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 [_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 [_extra_token_50258][_extra_token_50261][_extra_token_50358][BEG] For me, all people are equally independent of gender, sex, orientation, religion, hate, or gender coordinates of birth.[SOT] mycroft@OpenVoiceOS-e3830c:~/whisper $ minimal models/whisper-small.tflite de_speech_thorsten_sample03_8s.wav n_vocab:50257 mel.n_len3000 mel.n_mel:80 [_extra_token_50258][_extra_token_50261][_extra_token_50359][BEG] Für mich sind alle Menschen gleich, unabhängig von Geschlecht, sexueller Orientierung, Religion, Hautfarbe oder Geo-Koordinaten der Geburt.[SOT] IF you are really looking for Transcribe for all languages I recommend to use below generated models https://colab.research.google.com/github/usefulsensors/openai-whisper/blob/main/notebooks/whisper_encoder_decoder_tflite.ipynb Please see the below link to use multilanguage models on C++ |
I can't use whisper-medium.tflite in my phone.My phone's RAM is only 4GB.The medium need 5GB RAM aleast. |
I guess the best approach to use a multilanguage model is to use an encoder/decoder model from here |
Can you also try below model? |
OK.I try the tiny mode. Only one is recognized, and the others are translated into English |
I user the https://github.com/ipsilondev/whisper-cordova/blob/main/android/cpp/native-lib.cpp 2023-03-16 11:35:22.540 11364-11364/com.whisper.android.tflitecpp D/TFLiteASRDemo: On Record Stop Click |
Need to generate flex tflite library using bazel build |
|
It happened at line 290 . TFLITE_MINIMAL_CHECK(g_whisper_tflite_params.interpreter->AllocateTensors() == kTfLiteOk); |
I can't use this. I'll try it later. You mean that I need build a .tflite library called flex? |
bazel build -c opt --config=monolithic tensorflow/lite:libtensorflowlite |
Follow below link for more details |
undefined reference to `tflite::ops::builtin::BuiltinOpResolver::BuiltinOpResolver()' |
CMakeFiles/native-lib.dir/native-lib.cpp.o: In function |
CMakeLists add set_target_properties( tflite PROPERTIES IMPORTED_LOCATION |
ERROR: Skipping 'tensorflow/lite:libtensorflowlite_flex': error loading package 'tensorflow/lite': Every .bzl file must have a corresponding package, but '//tensorflow:tensorflow.bzl' does not have one. Please create a BUILD file in the same or any |
take new tensorflowlite clone and using bazel first build tflite flex library and then include newly generated library as part minimal make build |
Rfer below issue: I have build tensorflowlite_flex lib as below using bazel command: +find_library(TF_LIB_FLEX tensorflowlite_flex HINTS "${TENSORFLOW_SOURCE_DIR}/bazel-bin/tensorflow/lite/delegates/flex/") -Wl,--no-as-needed # Need --no-as-needed to link tensorflowlite_flex |
I have build succeeded tensorflowlite_flex lib on Linux. Then put the .so into android,it cannot work.Have you tried it on an Android phone? |
How to do real-time transcription? I need real-time transcription. |
You may need to cross compile lib for arm cores |
Refer stream_standalone for this |
use this command bazel build -c opt --config=elinux_aarch64 tensorflow/lite/delegates/flex:tensorflowlite_flex |
bazel build -c opt --fat_apk_cpu=x86,x86_64,arm64-v8a,armeabi-v7a |
I pick libtensorflowlite_jni.so out from https://central.sonatype.com/artifact/org.tensorflow/tensorflow-lite/2.11.0 |
are yu able to build flex tflite lib for android phones? |
I used the whisper-small.tflite to transcribe,but the asr result contains some like '[_extra_token_50258] ,[_extra_token_50260] ,,[_extra_token_50358]'.The result is not accurate at all.
I just replace the whisper.tflite with whisper-small.tflite.
The text was updated successfully, but these errors were encountered: