mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2023-11-04 02:52:44 +03:00
wip : WASM 128-bit SIMD support
This commit is contained in:
@@ -21,13 +21,14 @@ if (WHISPER_WASM_SINGLE_FILE)
|
||||
)
|
||||
endif()
|
||||
|
||||
#-s TOTAL_MEMORY=536870912 \
|
||||
set_target_properties(${TARGET} PROPERTIES LINK_FLAGS " \
|
||||
--bind \
|
||||
-s MODULARIZE=1 \
|
||||
-s ASSERTIONS=1 \
|
||||
-s USE_PTHREADS=1 \
|
||||
-s PTHREAD_POOL_SIZE=8 \
|
||||
-s TOTAL_MEMORY=536870912 \
|
||||
-s PTHREAD_POOL_SIZE=9 \
|
||||
-s ALLOW_MEMORY_GROWTH=1 \
|
||||
-s FORCE_FILESYSTEM=1 \
|
||||
-s EXPORT_NAME=\"'whisper_factory'\" \
|
||||
${EXTRA_FLAGS} \
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <emscripten/bind.h>
|
||||
|
||||
#include <vector>
|
||||
#include <thread>
|
||||
|
||||
std::vector<struct whisper_context *> g_contexts(4, nullptr);
|
||||
|
||||
@@ -47,7 +48,7 @@ EMSCRIPTEN_BINDINGS(whisper) {
|
||||
params.print_special_tokens = false;
|
||||
params.translate = false;
|
||||
params.language = "en";
|
||||
params.n_threads = 4;
|
||||
params.n_threads = std::min(8, (int) std::thread::hardware_concurrency());
|
||||
params.offset_ms = 0;
|
||||
|
||||
std::vector<float> pcmf32;
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user