whisper.rn 0.3.0-rc.7 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -3
- package/android/src/main/java/com/rnwhisper/WhisperContext.java +26 -2
- package/android/src/main/jni/whisper/jni.cpp +22 -1
- package/cpp/ggml.c +4627 -1594
- package/cpp/ggml.h +427 -25
- package/cpp/rn-whisper.cpp +7 -0
- package/cpp/rn-whisper.h +1 -0
- package/cpp/whisper.cpp +335 -199
- package/cpp/whisper.h +36 -6
- package/ios/RNWhisper.mm +44 -15
- package/ios/RNWhisperContext.h +2 -1
- package/ios/RNWhisperContext.mm +36 -2
- package/lib/commonjs/NativeRNWhisper.js.map +1 -1
- package/lib/commonjs/index.js +33 -2
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/NativeRNWhisper.js.map +1 -1
- package/lib/module/index.js +33 -2
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/NativeRNWhisper.d.ts +2 -0
- package/lib/typescript/NativeRNWhisper.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +12 -1
- package/lib/typescript/index.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/NativeRNWhisper.ts +2 -0
- package/src/index.ts +45 -3
- package/whisper-rn.podspec +10 -6
package/cpp/rn-whisper.cpp
CHANGED
|
@@ -25,6 +25,13 @@ void rn_whisper_abort_transcribe(int job_id) {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
bool rn_whisper_transcribe_is_aborted(int job_id) {
|
|
29
|
+
if (abort_map.find(job_id) != abort_map.end()) {
|
|
30
|
+
return abort_map[job_id];
|
|
31
|
+
}
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
|
|
28
35
|
void rn_whisper_abort_all_transcribe() {
|
|
29
36
|
for (auto it = abort_map.begin(); it != abort_map.end(); ++it) {
|
|
30
37
|
it->second = true;
|
package/cpp/rn-whisper.h
CHANGED
|
@@ -8,6 +8,7 @@ extern "C" {
|
|
|
8
8
|
bool* rn_whisper_assign_abort_map(int job_id);
|
|
9
9
|
void rn_whisper_remove_abort_map(int job_id);
|
|
10
10
|
void rn_whisper_abort_transcribe(int job_id);
|
|
11
|
+
bool rn_whisper_transcribe_is_aborted(int job_id);
|
|
11
12
|
void rn_whisper_abort_all_transcribe();
|
|
12
13
|
|
|
13
14
|
#ifdef __cplusplus
|