Skip to content

Commit

Permalink
roll back to faster whispercpp ver
Browse files Browse the repository at this point in the history
  • Loading branch information
royshil committed Nov 16, 2023
1 parent 1d80602 commit 677c08c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ set(USE_SYSTEM_CURL
OFF
CACHE STRING "Use system cURL")

if(LOCALVOCAL_WITH_CUDA)
add_compile_definitions(-DLOCALVOCAL_WITH_CUDA)
endif()

if(USE_SYSTEM_CURL)
find_package(CURL REQUIRED)
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE "${CURL_LIBRARIES}")
Expand Down
2 changes: 1 addition & 1 deletion cmake/BuildWhispercpp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ include(ExternalProject)

set(CMAKE_OSX_ARCHITECTURES_ "arm64$<SEMICOLON>x86_64")

set(Whispercpp_Build_GIT_TAG "ccc85b4ff8d250d0f25ebcac2be0e4a23401c885")
set(Whispercpp_Build_GIT_TAG "ec7a6f04f9c32adec2e6b0995b8c728c5bf56f35")

if(${CMAKE_BUILD_TYPE} STREQUAL Release OR ${CMAKE_BUILD_TYPE} STREQUAL RelWithDebInfo)
set(Whispercpp_BUILD_TYPE Release)
Expand Down
5 changes: 5 additions & 0 deletions src/whisper-processing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ struct whisper_context *init_whisper_context(const std::string &model_path)
obs_log(LOG_INFO, "Loading whisper model from %s", model_path.c_str());

struct whisper_context_params cparams;
#ifdef LOCALVOCAL_WITH_CUDA
cparams.use_gpu = true;
#else
cparams.use_gpu = false;
#endif

#ifdef _WIN32
// convert model path UTF8 to wstring (wchar_t) for whisper
Expand Down

0 comments on commit 677c08c

Please sign in to comment.