mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2024-12-19 04:37:51 +00:00
54a08bde29
* save the recorded audio to a file * Alignment -help * Save the correct audio * chage to a consistent coding style * Correct typo * Update examples/stream/stream.cpp * Update examples/stream/stream.cpp * Correct variable misuse * Update examples/stream/stream.cpp * Update examples/stream/stream.cpp * Update examples/stream/stream.cpp * Update examples/stream/stream.cpp * add *.bin .cxx/ .gradle/ cmake-build-debug/ to gitignore * add whisper.android.java * Added support for older versions of Android of Java * add examples for android java * add README.md for android java * add fullTranscribeWithTime * 增加 toString()方法和测试 * change return type to void * update to v1.4.1 * add WhisperService * chage to whisper_full_get_segment_t1 * add method transcribeDataWithTime * modified toString ``` return "[" + start + " --> " + end + "]:" + sentence; ``` * Optimize code logic * update text view on handle * set max lines * change Chinese to English * Update bindings/java/build.gradle * Update .gitignore * add android.java to github action * chage android.java to android_java in build.yml * remove gradle * chage jdk to temurin in android_java of CI * chage jdk to temurin 11 in android_java of CI * add x to gradlew * set api-level for android_java of CI * Update examples/whisper.android.java/app/src/main/jni/whisper/CMakeLists.txt * add ndk version in build.gradle * remove local.properties * add testFullTranscribeWithTime --------- Co-authored-by: litongmacos <litongjava@qq.com> Co-authored-by: bobqianic <129547291+bobqianic@users.noreply.github.com> |
||
---|---|---|
.. | ||
app | ||
gradle/wrapper | ||
README_files | ||
.gitignore | ||
build.gradle | ||
gradle.properties | ||
gradlew | ||
gradlew.bat | ||
README.md | ||
settings.gradle |
A sample Android app using java code and whisper.cpp to do voice-to-text transcriptions.
To use:
- Select a model from the whisper.cpp repository.1
- Copy the model to the "app/src/main/assets/models" folder.
- Select a sample audio file (for example, jfk.wav).
- Copy the sample to the "app/src/main/assets/samples" folder.
- Modify the modelFilePath in the WhisperService.java
- Modify the sampleFilePath in the WhisperService.java
- Select the "release" active build variant, and use Android Studio to run and deploy to your device.
PS:
- Do not move this android project folder individually to other folders, because this android project folder depends on the files of the whole project.
- The cpp code is compiled during the build process
- If you want to import a compiled cpp project in your Android project, please refer to the https://github.com/litongjava/whisper.cpp.android.java.demo
-
I recommend the tiny or base models for running on an Android device. ↩︎