-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
integrate ggml's excellent and amazing whisper.cpp to kantv ---- step5
refine whispercpp's JNI code and native code finish whispercpp inference benchmark refine the ASRFragment.java(more make sense with UI status) I successfully integrated FFmpeg into whisper.cpp for the first time
- Loading branch information
Showing
178 changed files
with
36,702 additions
and
655 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
125 changes: 0 additions & 125 deletions
125
cdeosplayer/cdeosplayer-lib/src/main/java/org/ggml/whispercpp/CpuInfo.java
This file was deleted.
Oops, something went wrong.
112 changes: 0 additions & 112 deletions
112
cdeosplayer/cdeosplayer-lib/src/main/java/org/ggml/whispercpp/WhisperContext.java
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
cdeosplayer/cdeosplayer-lib/src/main/java/org/ggml/whispercpp/WhisperCpuConfig.java
This file was deleted.
Oops, something went wrong.
44 changes: 0 additions & 44 deletions
44
cdeosplayer/cdeosplayer-lib/src/main/java/org/ggml/whispercpp/WhisperLib.java
This file was deleted.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
cdeosplayer/cdeosplayer-lib/src/main/java/org/ggml/whispercpp/whispercpp.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
//TODO: re-write entire whispercpp.java with standard Android JNI specification | ||
// interaction between KANTVMgr.java and whispercpp.java | ||
|
||
package org.ggml.whispercpp; | ||
|
||
public class whispercpp { | ||
private static final String TAG = whispercpp.class.getName(); | ||
|
||
public static native String getSystemInfo(); | ||
|
||
public static native String benchMemcpy(int nThreadCounts); | ||
|
||
public static native String benchMulMat(int nThreadCounts); | ||
|
||
public static native void set_mulmat_benchmark_status(int bExitBenchmark); | ||
|
||
public static native String transcribe_from_file(String modelPath, String audioFile, int nThreadCounts); | ||
} |
Oops, something went wrong.
93397b7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
forget to send KANTV_INFO_ASR_RESULT from native layer(in whisper.cpp) so playback of jfk.wav will be launched when ASR result is displayed in UI
https://github.com/cdeos/kantv/blob/kantv-poc-with-whispercpp/external/whispercpp/whisper.cpp#L6961
93397b7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should follow coding style of GGML:
https://github.com/cdeos/kantv/blob/kantv-poc-with-whispercpp/external/whispercpp/whisper.cpp#L6712
93397b7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo here:
https://github.com/cdeos/kantv/blob/kantv-poc-with-whispercpp/external/whispercpp/whisper.cpp#L6846
93397b7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line should be removed because I replace the original method(what I did this morning) which caller should be responsible for release memory and take care of potential memory leak.
https://github.com/cdeos/kantv/blob/kantv-poc-with-whispercpp/external/whispercpp/whisper.cpp#L6878
93397b7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add code to handle corner case: whispercpp 's inference failure
https://github.com/cdeos/kantv/blob/kantv-poc-with-whispercpp/external/whispercpp/whisper.cpp#L6981