Support Chinese vits models (#368)
This commit is contained in:
@@ -6,7 +6,7 @@ function(download_kaldi_decoder)
|
||||
set(kaldi_decoder_HASH "SHA256=98bf445a5b7961ccf3c3522317d900054eaadb6a9cdcf4531e7d9caece94a56d")
|
||||
|
||||
set(KALDI_DECODER_BUILD_PYTHON OFF CACHE BOOL "" FORCE)
|
||||
set(KALDI_DECODER_BUILD_PYTHON OFF CACHE BOOL "" FORCE)
|
||||
set(KALDI_DECODER_ENABLE_TESTS OFF CACHE BOOL "" FORCE)
|
||||
set(KALDIFST_BUILD_PYTHON OFF CACHE BOOL "" FORCE)
|
||||
|
||||
# If you don't have access to the Internet,
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
function(download_kaldi_native_fbank)
|
||||
include(FetchContent)
|
||||
|
||||
set(kaldi_native_fbank_URL "https://github.com/csukuangfj/kaldi-native-fbank/archive/refs/tags/v1.18.1.tar.gz")
|
||||
set(kaldi_native_fbank_URL2 "https://huggingface.co/csukuangfj/sherpa-onnx-cmake-deps/resolve/main/kaldi-native-fbank-1.18.1.tar.gz")
|
||||
set(kaldi_native_fbank_HASH "SHA256=c7676f319fa97e8c8bca6018792de120895dcfe122fa9b4bff00f8f9165348e7")
|
||||
set(kaldi_native_fbank_URL "https://github.com/csukuangfj/kaldi-native-fbank/archive/refs/tags/v1.18.5.tar.gz")
|
||||
set(kaldi_native_fbank_URL2 "https://huggingface.co/csukuangfj/sherpa-onnx-cmake-deps/resolve/main/kaldi-native-fbank-1.18.5.tar.gz")
|
||||
set(kaldi_native_fbank_HASH "SHA256=dce0cb3bc6fece5d8053d8780cb4ce22da57cb57ebec332641661521a0425283")
|
||||
|
||||
set(KALDI_NATIVE_FBANK_BUILD_TESTS OFF CACHE BOOL "" FORCE)
|
||||
set(KALDI_NATIVE_FBANK_BUILD_PYTHON OFF CACHE BOOL "" FORCE)
|
||||
@@ -12,11 +12,11 @@ function(download_kaldi_native_fbank)
|
||||
# If you don't have access to the Internet,
|
||||
# please pre-download kaldi-native-fbank
|
||||
set(possible_file_locations
|
||||
$ENV{HOME}/Downloads/kaldi-native-fbank-1.18.1.tar.gz
|
||||
${PROJECT_SOURCE_DIR}/kaldi-native-fbank-1.18.1.tar.gz
|
||||
${PROJECT_BINARY_DIR}/kaldi-native-fbank-1.18.1.tar.gz
|
||||
/tmp/kaldi-native-fbank-1.18.1.tar.gz
|
||||
/star-fj/fangjun/download/github/kaldi-native-fbank-1.18.1.tar.gz
|
||||
$ENV{HOME}/Downloads/kaldi-native-fbank-1.18.5.tar.gz
|
||||
${PROJECT_SOURCE_DIR}/kaldi-native-fbank-1.18.5.tar.gz
|
||||
${PROJECT_BINARY_DIR}/kaldi-native-fbank-1.18.5.tar.gz
|
||||
/tmp/kaldi-native-fbank-1.18.5.tar.gz
|
||||
/star-fj/fangjun/download/github/kaldi-native-fbank-1.18.5.tar.gz
|
||||
)
|
||||
|
||||
foreach(f IN LISTS possible_file_locations)
|
||||
|
||||
45
cmake/utfcpp.cmake
Normal file
45
cmake/utfcpp.cmake
Normal file
@@ -0,0 +1,45 @@
|
||||
function(download_utfcpp)
|
||||
include(FetchContent)
|
||||
|
||||
set(utfcpp_URL "https://github.com/nemtrif/utfcpp/archive/refs/tags/v3.2.5.tar.gz")
|
||||
set(utfcpp_URL2 "https://huggingface.co/csukuangfj/sherpa-onnx-cmake-deps/resolve/main/utfcpp-3.2.5.tar.gz")
|
||||
set(utfcpp_HASH "SHA256=14fd1b3c466814cb4c40771b7f207b61d2c7a0aa6a5e620ca05c00df27f25afd")
|
||||
|
||||
# If you don't have access to the Internet,
|
||||
# please pre-download utfcpp
|
||||
set(possible_file_locations
|
||||
$ENV{HOME}/Downloads/utfcpp-3.2.5.tar.gz
|
||||
${PROJECT_SOURCE_DIR}/utfcpp-3.2.5.tar.gz
|
||||
${PROJECT_BINARY_DIR}/utfcpp-3.2.5.tar.gz
|
||||
/tmp/utfcpp-3.2.5.tar.gz
|
||||
/star-fj/fangjun/download/github/utfcpp-3.2.5.tar.gz
|
||||
)
|
||||
|
||||
foreach(f IN LISTS possible_file_locations)
|
||||
if(EXISTS ${f})
|
||||
set(utfcpp_URL "${f}")
|
||||
file(TO_CMAKE_PATH "${utfcpp_URL}" utfcpp_URL)
|
||||
message(STATUS "Found local downloaded utfcpp: ${utfcpp_URL}")
|
||||
set(utfcpp_URL2)
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
FetchContent_Declare(utfcpp
|
||||
URL
|
||||
${utfcpp_URL}
|
||||
${utfcpp_URL2}
|
||||
URL_HASH ${utfcpp_HASH}
|
||||
)
|
||||
|
||||
FetchContent_GetProperties(utfcpp)
|
||||
if(NOT utfcpp_POPULATED)
|
||||
message(STATUS "Downloading utfcpp from ${utfcpp_URL}")
|
||||
FetchContent_Populate(utfcpp)
|
||||
endif()
|
||||
message(STATUS "utfcpp is downloaded to ${utfcpp_SOURCE_DIR}")
|
||||
# add_subdirectory(${utfcpp_SOURCE_DIR} ${utfcpp_BINARY_DIR} EXCLUDE_FROM_ALL)
|
||||
include_directories(${utfcpp_SOURCE_DIR})
|
||||
endfunction()
|
||||
|
||||
download_utfcpp()
|
||||
Reference in New Issue
Block a user