whisper.rn 0.1.4 → 0.1.5
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/LICENSE +1 -1
- package/android/src/main/jni/whisper/jni.cpp +1 -5
- package/cpp/whisper.cpp +603 -412
- package/cpp/whisper.h +120 -40
- package/ios/RNWhisper.mm +1 -1
- package/package.json +2 -2
- package/whisper-rn.podspec +15 -8
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2023 Jhen
|
|
3
|
+
Copyright (c) 2023 Jhen-Jie Hong
|
|
4
4
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
5
|
of this software and associated documentation files (the "Software"), to deal
|
|
6
6
|
in the Software without restriction, including without limitation the rights
|
|
@@ -19,10 +19,6 @@ static inline int min(int a, int b) {
|
|
|
19
19
|
return (a < b) ? a : b;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
static inline int max(int a, int b) {
|
|
23
|
-
return (a > b) ? a : b;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
22
|
extern "C" {
|
|
27
23
|
|
|
28
24
|
JNIEXPORT jlong JNICALL
|
|
@@ -63,7 +59,7 @@ Java_com_rnwhisper_WhisperContext_fullTranscribe(
|
|
|
63
59
|
jfloat *audio_data_arr = env->GetFloatArrayElements(audio_data, nullptr);
|
|
64
60
|
const jsize audio_data_length = env->GetArrayLength(audio_data);
|
|
65
61
|
|
|
66
|
-
int max_threads =
|
|
62
|
+
int max_threads = min(4, get_nprocs());
|
|
67
63
|
|
|
68
64
|
LOGI("About to create params");
|
|
69
65
|
|