简体中文 | English
Disclaimer, this document was obtained through machine translation, please check the original document here.
- To start by cloning the Whisper native source code, as we need some of its files, run the following command from the root of the
whisper-finetune
project.
git clone https://github.com/openai/whisper.git
- To convert your models, run
convert-ggml.py
from the root of yourWhisper-Finetune
project to convert your models to ggml format for your Android project. The models you need to convert can be original Transformers. It can also be a fine-tuned model.
python convert-ggml.py --model_dir=models/whisper-tiny-finetune/ --whisper_dir=whisper/ --output_path=models/ggml-model.bin
- Put the model in the Android project
app/SRC/main/assets/models
directory, and then you can use the Android open Studio project.
- The default NDK version used is
25.2.9519653
, if you change the other version below, you will need to change the configuration inapp/build.gradle
. - Note that in real use, be sure to release the
release
APK package so that inference is fast. - This project has released the
release
APK package, please scan the code at the end of theWhisker-finetune
project homepage to download it.
The effect picture is as follows. The model used here is quantized as a half-precision tiny model, which has a low accuracy.
Can click here to download the Android APK, note that in order to install package is small, quantitative model used here for half a tiny model precision and accuracy is not high, if you want to change model, please compile the project execution.