mirror of
https://github.com/occ-ai/obs-localvocal
synced 2024-11-08 03:08:07 +00:00
31c41a9574
* Update translation-utils.h, transcription-filter.h, whisper-model-utils.h, model-find-utils.h, and model-downloader.h * Update create_context function to include ct2ModelFolder parameter * fix: add fix_utf8 flag to transcription_filter_data struct * Update create_context function to include ct2ModelFolder parameter * Update read_text_from_file function to include join_sentences parameter * fix: Update VadIterator::reset_states to include reset_hc parameter * Update create_context function to include whisper_sampling_method parameter * Update tests README with additional configuration options * feat: Add function to find file in folder by regex expression * refactor: Improve text conditioning logic in transcription-filter.cpp * refactor: Improve text conditioning logic in transcription-filter.cpp * chore: Update ctranslate2 dependency to version 1.2.0 * refactor: Improve text conditioning logic in transcription-filter.cpp * chore: Update cmake BuildCTranslate2.cmake to disable -Wno-comma warning * refactor: Update translation context in whisper-processing.cpp and translation-utils.cpp
49 lines
1.3 KiB
CMake
49 lines
1.3 KiB
CMake
# Find LibAV from the OBS dependencies
|
|
|
|
function(find_libav TARGET)
|
|
if(UNIX AND NOT APPLE)
|
|
find_package(PkgConfig REQUIRED)
|
|
pkg_check_modules(
|
|
FFMPEG
|
|
REQUIRED
|
|
IMPORTED_TARGET
|
|
libavformat
|
|
libavcodec
|
|
libavutil
|
|
libswresample)
|
|
if(FFMPEG_FOUND)
|
|
target_link_libraries(${TARGET} PRIVATE PkgConfig::FFMPEG)
|
|
else()
|
|
message(FATAL_ERROR "FFMPEG not found!")
|
|
endif()
|
|
return()
|
|
endif()
|
|
|
|
if(NOT buildspec)
|
|
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/buildspec.json" buildspec)
|
|
endif()
|
|
string(
|
|
JSON
|
|
version
|
|
GET
|
|
${buildspec}
|
|
dependencies
|
|
prebuilt
|
|
version)
|
|
|
|
if(MSVC)
|
|
set(arch ${CMAKE_GENERATOR_PLATFORM})
|
|
elseif(APPLE)
|
|
set(arch universal)
|
|
endif()
|
|
set(deps_root "${CMAKE_CURRENT_SOURCE_DIR}/.deps/obs-deps-${version}-${arch}")
|
|
|
|
target_include_directories(${TARGET} PRIVATE "${deps_root}/include")
|
|
target_link_libraries(
|
|
${TARGET}
|
|
PRIVATE "${deps_root}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}avcodec${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
|
"${deps_root}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}avformat${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
|
"${deps_root}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}avutil${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
|
"${deps_root}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}swresample${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
|
endfunction(find_libav)
|