whisper.rn 0.3.4 → 0.3.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/README.md +15 -2
- package/android/build.gradle +12 -2
- package/android/src/main/CMakeLists.txt +55 -0
- package/android/src/main/java/com/rnwhisper/RNWhisper.java +268 -0
- package/android/src/newarch/java/com/rnwhisper/RNWhisperModule.java +10 -228
- package/android/src/oldarch/java/com/rnwhisper/RNWhisperModule.java +16 -222
- package/cpp/README.md +4 -0
- package/cpp/coreml/whisper-encoder.mm +4 -2
- package/cpp/ggml.c +9 -1
- package/cpp/ggml.h +1 -0
- package/cpp/whisper.cpp +151 -99
- package/cpp/whisper.h +2 -1
- package/ios/RNWhisperContext.mm +2 -2
- package/lib/commonjs/index.js +2 -2
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/index.js +2 -2
- package/lib/module/index.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +2 -2
- package/android/src/main/jni/whisper/Android.mk +0 -26
- package/android/src/main/jni/whisper/Application.mk +0 -1
- package/android/src/main/jni/whisper/Whisper.mk +0 -22
- /package/android/src/main/{jni/whisper/jni.cpp → jni.cpp} +0 -0
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
LOCAL_PATH := $(call my-dir)
|
|
2
|
-
include $(CLEAR_VARS)
|
|
3
|
-
LOCAL_MODULE := libwhisper
|
|
4
|
-
include $(LOCAL_PATH)/Whisper.mk
|
|
5
|
-
include $(BUILD_SHARED_LIBRARY)
|
|
6
|
-
|
|
7
|
-
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
|
|
8
|
-
include $(CLEAR_VARS)
|
|
9
|
-
LOCAL_MODULE := libwhisper_vfpv4
|
|
10
|
-
include $(LOCAL_PATH)/Whisper.mk
|
|
11
|
-
# Allow building NEON FMA code.
|
|
12
|
-
# https://android.googlesource.com/platform/ndk/+/master/sources/android/cpufeatures/cpu-features.h
|
|
13
|
-
LOCAL_CFLAGS += -mfpu=neon-vfpv4
|
|
14
|
-
include $(BUILD_SHARED_LIBRARY)
|
|
15
|
-
endif
|
|
16
|
-
|
|
17
|
-
ifeq ($(TARGET_ARCH_ABI),arm64-v8a)
|
|
18
|
-
include $(CLEAR_VARS)
|
|
19
|
-
LOCAL_MODULE := libwhisper_v8fp16_va
|
|
20
|
-
include $(LOCAL_PATH)/Whisper.mk
|
|
21
|
-
# Allow building NEON FMA code.
|
|
22
|
-
# https://android.googlesource.com/platform/ndk/+/master/sources/android/cpufeatures/cpu-features.h
|
|
23
|
-
LOCAL_CFLAGS += -march=armv8.2-a+fp16
|
|
24
|
-
include $(BUILD_SHARED_LIBRARY)
|
|
25
|
-
endif
|
|
26
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
APP_STL := c++_static
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
WHISPER_LIB_DIR := $(LOCAL_PATH)/../../../../../cpp
|
|
2
|
-
LOCAL_LDLIBS := -landroid -llog
|
|
3
|
-
|
|
4
|
-
# NOTE: If you want to debug the native code, you can uncomment ifneq and endif
|
|
5
|
-
# ifneq ($(APP_OPTIM),debug)
|
|
6
|
-
|
|
7
|
-
# Make the final output library smaller by only keeping the symbols referenced from the app.
|
|
8
|
-
LOCAL_CFLAGS += -O3 -DNDEBUG
|
|
9
|
-
LOCAL_CFLAGS += -fvisibility=hidden -fvisibility-inlines-hidden
|
|
10
|
-
LOCAL_CFLAGS += -ffunction-sections -fdata-sections
|
|
11
|
-
LOCAL_LDFLAGS += -Wl,--gc-sections
|
|
12
|
-
LOCAL_LDFLAGS += -Wl,--exclude-libs,ALL
|
|
13
|
-
LOCAL_LDFLAGS += -flto
|
|
14
|
-
|
|
15
|
-
# endif
|
|
16
|
-
|
|
17
|
-
LOCAL_CFLAGS += -DSTDC_HEADERS -std=c11 -I $(WHISPER_LIB_DIR)
|
|
18
|
-
LOCAL_CPPFLAGS += -std=c++11 -I $(WHISPER_LIB_DIR)
|
|
19
|
-
LOCAL_SRC_FILES := $(WHISPER_LIB_DIR)/ggml.c \
|
|
20
|
-
$(WHISPER_LIB_DIR)/whisper.cpp \
|
|
21
|
-
$(WHISPER_LIB_DIR)/rn-whisper.cpp \
|
|
22
|
-
$(LOCAL_PATH)/jni.cpp
|
|
File without changes
|