mirror of
https://github.com/occ-ai/obs-localvocal
synced 2024-11-07 18:57:14 +00:00
refactor: Update whisper model path and add flag for model loaded status
This commit is contained in:
parent
b3e4bfa33a
commit
73c91765a5
@ -105,20 +105,7 @@ elseif(WIN32)
|
||||
|
||||
# glob all dlls in the bin directory and install them
|
||||
file(GLOB WHISPER_DLLS ${whispercpp_fetch_SOURCE_DIR}/bin/*.dll)
|
||||
foreach(FILE ${WHISPER_DLLS})
|
||||
file(RELATIVE_PATH REL_FILE ${whispercpp_fetch_SOURCE_DIR}/bin ${FILE})
|
||||
set(DEST_DIR "${CMAKE_SOURCE_DIR}/release/${CMAKE_BUILD_TYPE}/obs-plugins/64bit")
|
||||
set(DEST_FILE "${DEST_DIR}/${REL_FILE}")
|
||||
|
||||
if(NOT EXISTS ${DEST_DIR})
|
||||
file(MAKE_DIRECTORY ${DEST_DIR})
|
||||
endif()
|
||||
|
||||
if(NOT EXISTS ${DEST_FILE} OR ${FILE} IS_NEWER_THAN ${DEST_FILE})
|
||||
message(STATUS "Copying ${FILE} to ${DEST_FILE}")
|
||||
file(COPY ${FILE} DESTINATION ${DEST_DIR})
|
||||
endif()
|
||||
endforeach()
|
||||
install(FILES ${WHISPER_DLLS} DESTINATION "obs-plugins/64bit")
|
||||
else()
|
||||
set(Whispercpp_Build_GIT_TAG "v1.6.2")
|
||||
set(WHISPER_EXTRA_CXX_FLAGS "-fPIC")
|
||||
|
@ -18,7 +18,7 @@ void create_obs_text_source_if_needed()
|
||||
obs_source_t *scene_as_source = obs_frontend_get_current_scene();
|
||||
obs_scene_t *scene = obs_scene_from_source(scene_as_source);
|
||||
#ifdef _WIN32
|
||||
source = obs_source_create("text_gdiplus_v2", "LocalVocal Subtitles", nullptr, nullptr);
|
||||
source = obs_source_create("text_gdiplus_v3", "LocalVocal Subtitles", nullptr, nullptr);
|
||||
#else
|
||||
source = obs_source_create("text_ft2_source_v2", "LocalVocal Subtitles", nullptr, nullptr);
|
||||
#endif
|
||||
@ -64,6 +64,7 @@ bool add_sources_to_list(void *list_property, obs_source_t *source)
|
||||
{
|
||||
auto source_id = obs_source_get_id(source);
|
||||
if (strcmp(source_id, "text_ft2_source_v2") != 0 &&
|
||||
strcmp(source_id, "text_gdiplus_v3") != 0 &&
|
||||
strcmp(source_id, "text_gdiplus_v2") != 0) {
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user