mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2024-12-19 04:37:51 +00:00
68ecadbbc9
Same as the command-line tool "command", but runs in the browser Also, added helper script "extra/deploy-wasm.sh" and fixed some timing constants for the WASM examples.
32 lines
659 B
CMake
32 lines
659 B
CMake
# dependencies
|
|
|
|
find_package(Threads REQUIRED)
|
|
|
|
# third-party
|
|
|
|
if (WHISPER_SUPPORT_SDL2)
|
|
# SDL2
|
|
find_package(SDL2 REQUIRED)
|
|
|
|
string(STRIP "${SDL2_LIBRARIES}" SDL2_LIBRARIES)
|
|
|
|
message(STATUS "SDL2_INCLUDE_DIRS = ${SDL2_INCLUDE_DIRS}")
|
|
message(STATUS "SDL2_LIBRARIES = ${SDL2_LIBRARIES}")
|
|
endif()
|
|
|
|
# examples
|
|
|
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
if (EMSCRIPTEN)
|
|
add_subdirectory(whisper.wasm)
|
|
add_subdirectory(stream.wasm)
|
|
add_subdirectory(command.wasm)
|
|
add_subdirectory(talk.wasm)
|
|
else()
|
|
add_subdirectory(main)
|
|
add_subdirectory(stream)
|
|
add_subdirectory(command)
|
|
add_subdirectory(bench)
|
|
endif()
|