whisper.rn 0.3.0-rc.7 → 0.3.0
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 +3 -1
- package/cpp/ggml.c +4627 -1594
- package/cpp/ggml.h +427 -25
- package/cpp/whisper.cpp +226 -102
- package/cpp/whisper.h +30 -6
- package/package.json +1 -1
- package/whisper-rn.podspec +10 -6
package/whisper-rn.podspec
CHANGED
|
@@ -4,7 +4,12 @@ package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
|
4
4
|
base_ld_flags = "-framework Accelerate"
|
|
5
5
|
base_compiler_flags = "-DGGML_USE_ACCELERATE -Wno-shorten-64-to-32"
|
|
6
6
|
folly_compiler_flags = "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma"
|
|
7
|
-
|
|
7
|
+
|
|
8
|
+
# Use base_optimizer_flags = "" for debug builds
|
|
9
|
+
# base_optimizer_flags = ""
|
|
10
|
+
base_optimizer_flags = "-O3 -DNDEBUG" +
|
|
11
|
+
" -fvisibility=hidden -fvisibility-inlines-hidden" +
|
|
12
|
+
" -ffunction-sections -fdata-sections"
|
|
8
13
|
|
|
9
14
|
if ENV['RNWHISPER_DISABLE_COREML'] != '1' then
|
|
10
15
|
base_ld_flags += " -framework CoreML"
|
|
@@ -29,8 +34,8 @@ Pod::Spec.new do |s|
|
|
|
29
34
|
s.compiler_flags = base_compiler_flags
|
|
30
35
|
s.pod_target_xcconfig = {
|
|
31
36
|
"OTHER_LDFLAGS" => base_ld_flags,
|
|
32
|
-
"OTHER_CFLAGS
|
|
33
|
-
"OTHER_CPLUSPLUSFLAGS
|
|
37
|
+
"OTHER_CFLAGS" => base_optimizer_flags,
|
|
38
|
+
"OTHER_CPLUSPLUSFLAGS" => base_optimizer_flags
|
|
34
39
|
}
|
|
35
40
|
|
|
36
41
|
# Don't install the dependencies when we run `pod install` in the old architecture.
|
|
@@ -41,9 +46,8 @@ Pod::Spec.new do |s|
|
|
|
41
46
|
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
|
|
42
47
|
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
|
|
43
48
|
"OTHER_LDFLAGS" => "-framework Accelerate",
|
|
44
|
-
"OTHER_CFLAGS
|
|
45
|
-
"OTHER_CPLUSPLUSFLAGS
|
|
46
|
-
"OTHER_CPLUSPLUSFLAGS[config=Release]" => new_arch_cpp_flags + " " + base_optimizer_flags
|
|
49
|
+
"OTHER_CFLAGS" => base_optimizer_flags,
|
|
50
|
+
"OTHER_CPLUSPLUSFLAGS" => new_arch_cpp_flags + " " + base_optimizer_flags
|
|
47
51
|
}
|
|
48
52
|
s.dependency "React-Codegen"
|
|
49
53
|
s.dependency "RCT-Folly"
|