Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
DeepSpeech
提交
cd3c57d5
D
DeepSpeech
项目概览
PaddlePaddle
/
DeepSpeech
大约 2 年 前同步成功
通知
210
Star
8425
Fork
1598
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
245
列表
看板
标记
里程碑
合并请求
3
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
DeepSpeech
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
245
Issue
245
列表
看板
标记
里程碑
合并请求
3
合并请求
3
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
cd3c57d5
编写于
3月 03, 2022
作者:
S
SmileGoat
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add build.sh & openblas
上级
ca5ed023
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
58 addition
and
50 deletion
+58
-50
speechx/CMakeLists.txt
speechx/CMakeLists.txt
+30
-45
speechx/build.sh
speechx/build.sh
+23
-0
speechx/speechx/CMakeLists.txt
speechx/speechx/CMakeLists.txt
+1
-1
speechx/speechx/kaldi/matrix/CMakeLists.txt
speechx/speechx/kaldi/matrix/CMakeLists.txt
+1
-1
speechx/speechx/kaldi/matrix/kaldi-blas.h
speechx/speechx/kaldi/matrix/kaldi-blas.h
+3
-3
未找到文件。
speechx/CMakeLists.txt
浏览文件 @
cd3c57d5
...
@@ -49,24 +49,7 @@ include_directories(${absl_SOURCE_DIR})
...
@@ -49,24 +49,7 @@ include_directories(${absl_SOURCE_DIR})
#)
#)
#FetchContent_MakeAvailable(libsndfile)
#FetchContent_MakeAvailable(libsndfile)
#boost
set
(
boost_SOURCE_DIR
${
fc_patch
}
/boost-src
)
set
(
boost_SOURCE_DIR
${
fc_patch
}
/boost-src
)
set
(
boost_PREFIX_DIR
${
fc_patch
}
/boost-subbuild/boost-prefix
)
include
(
ExternalProject
)
ExternalProject_Add
(
boost
URL https://boostorg.jfrog.io/artifactory/main/release/1.75.0/source/boost_1_75_0.tar.gz
URL_HASH SHA256=aeb26f80e80945e82ee93e5939baebdca47b9dee80a07d3144be1e1a6a66dd6a
SOURCE_DIR
${
boost_SOURCE_DIR
}
PREFIX
${
boost_PREFIX_DIR
}
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND ./bootstrap.sh
BUILD_COMMAND ./b2
INSTALL_COMMAND
""
)
link_directories
(
${
boost_SOURCE_DIR
}
/stage/lib
)
include_directories
(
${
boost_SOURCE_DIR
}
)
set
(
BOOST_ROOT
${
boost_SOURCE_DIR
}
)
set
(
BOOST_ROOT
${
boost_SOURCE_DIR
}
)
include
(
FetchContent
)
include
(
FetchContent
)
FetchContent_Declare
(
FetchContent_Declare
(
...
@@ -75,10 +58,9 @@ FetchContent_Declare(
...
@@ -75,10 +58,9 @@ FetchContent_Declare(
GIT_TAG
"df2d717e95183f79a90b2fa6e4307083a351ca6a"
GIT_TAG
"df2d717e95183f79a90b2fa6e4307083a351ca6a"
)
)
FetchContent_MakeAvailable
(
kenlm
)
FetchContent_MakeAvailable
(
kenlm
)
add_dependencies
(
kenlm boost
)
include_directories
(
${
kenlm_SOURCE_DIR
}
)
include_directories
(
${
kenlm_SOURCE_DIR
}
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-std=c++14 -pthread -fPIC -O0 -Wall -g
-ggdb
"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-std=c++14 -pthread -fPIC -O0 -Wall -g"
)
# gflags
# gflags
FetchContent_Declare
(
FetchContent_Declare
(
gflags
gflags
...
@@ -98,11 +80,11 @@ FetchContent_MakeAvailable(glog)
...
@@ -98,11 +80,11 @@ FetchContent_MakeAvailable(glog)
include_directories
(
${
glog_BINARY_DIR
}
${
glog_SOURCE_DIR
}
/src
)
include_directories
(
${
glog_BINARY_DIR
}
${
glog_SOURCE_DIR
}
/src
)
# gtest
# gtest
FetchContent_Declare
(
googletest
#
FetchContent_Declare(googletest
URL https://github.com/google/googletest/archive/release-1.10.0.zip
#
URL https://github.com/google/googletest/archive/release-1.10.0.zip
URL_HASH SHA256=94c634d499558a76fa649edb13721dce6e98fb1e7018dfaeba3cd7a083945e91
#
URL_HASH SHA256=94c634d499558a76fa649edb13721dce6e98fb1e7018dfaeba3cd7a083945e91
)
#
)
FetchContent_MakeAvailable
(
googletest
)
#
FetchContent_MakeAvailable(googletest)
# openfst
# openfst
set
(
openfst_SOURCE_DIR
${
fc_patch
}
/openfst-src
)
set
(
openfst_SOURCE_DIR
${
fc_patch
}
/openfst-src
)
...
@@ -111,7 +93,7 @@ set(openfst_PREFIX_DIR ${fc_patch}/openfst-subbuild/openfst-populate-prefix)
...
@@ -111,7 +93,7 @@ set(openfst_PREFIX_DIR ${fc_patch}/openfst-subbuild/openfst-populate-prefix)
ExternalProject_Add
(
openfst
ExternalProject_Add
(
openfst
URL https://github.com/mjansche/openfst/archive/refs/tags/1.7.2.zip
URL https://github.com/mjansche/openfst/archive/refs/tags/1.7.2.zip
URL_HASH SHA256=ffc56931025579a8af3515741c0f3b0fc3a854c023421472c07ca0c6389c75e6
URL_HASH SHA256=ffc56931025579a8af3515741c0f3b0fc3a854c023421472c07ca0c6389c75e6
#
PREFIX ${openfst_PREFIX_DIR}
#
PREFIX ${openfst_PREFIX_DIR}
SOURCE_DIR
${
openfst_SOURCE_DIR
}
SOURCE_DIR
${
openfst_SOURCE_DIR
}
BINARY_DIR
${
openfst_BINARY_DIR
}
BINARY_DIR
${
openfst_BINARY_DIR
}
CONFIGURE_COMMAND
${
openfst_SOURCE_DIR
}
/configure --prefix=
${
openfst_PREFIX_DIR
}
CONFIGURE_COMMAND
${
openfst_SOURCE_DIR
}
/configure --prefix=
${
openfst_PREFIX_DIR
}
...
@@ -142,14 +124,10 @@ set(PADDLE_LIB ${fc_patch}/paddle-lib)
...
@@ -142,14 +124,10 @@ set(PADDLE_LIB ${fc_patch}/paddle-lib)
include_directories
(
"
${
PADDLE_LIB
}
/paddle/include"
)
include_directories
(
"
${
PADDLE_LIB
}
/paddle/include"
)
set
(
PADDLE_LIB_THIRD_PARTY_PATH
"
${
PADDLE_LIB
}
/third_party/install/"
)
set
(
PADDLE_LIB_THIRD_PARTY_PATH
"
${
PADDLE_LIB
}
/third_party/install/"
)
include_directories
(
"
${
PADDLE_LIB_THIRD_PARTY_PATH
}
protobuf/include"
)
include_directories
(
"
${
PADDLE_LIB_THIRD_PARTY_PATH
}
protobuf/include"
)
#include_directories("${PADDLE_LIB_THIRD_PARTY_PATH}glog/include")
#include_directories("${PADDLE_LIB_THIRD_PARTY_PATH}gflags/include")
include_directories
(
"
${
PADDLE_LIB_THIRD_PARTY_PATH
}
xxhash/include"
)
include_directories
(
"
${
PADDLE_LIB_THIRD_PARTY_PATH
}
xxhash/include"
)
include_directories
(
"
${
PADDLE_LIB_THIRD_PARTY_PATH
}
cryptopp/include"
)
include_directories
(
"
${
PADDLE_LIB_THIRD_PARTY_PATH
}
cryptopp/include"
)
link_directories
(
"
${
PADDLE_LIB_THIRD_PARTY_PATH
}
protobuf/lib"
)
link_directories
(
"
${
PADDLE_LIB_THIRD_PARTY_PATH
}
protobuf/lib"
)
#link_directories("${PADDLE_LIB_THIRD_PARTY_PATH}glog/lib")
#link_directories("${PADDLE_LIB_THIRD_PARTY_PATH}gflags/lib")
link_directories
(
"
${
PADDLE_LIB_THIRD_PARTY_PATH
}
xxhash/lib"
)
link_directories
(
"
${
PADDLE_LIB_THIRD_PARTY_PATH
}
xxhash/lib"
)
link_directories
(
"
${
PADDLE_LIB_THIRD_PARTY_PATH
}
cryptopp/lib"
)
link_directories
(
"
${
PADDLE_LIB_THIRD_PARTY_PATH
}
cryptopp/lib"
)
link_directories
(
"
${
PADDLE_LIB
}
/paddle/lib"
)
link_directories
(
"
${
PADDLE_LIB
}
/paddle/lib"
)
...
@@ -171,23 +149,30 @@ set(DEPS ${DEPS}
...
@@ -171,23 +149,30 @@ set(DEPS ${DEPS}
glog gflags protobuf xxhash cryptopp
glog gflags protobuf xxhash cryptopp
${
EXTERNAL_LIB
}
)
${
EXTERNAL_LIB
}
)
add_subdirectory
(
speechx
)
#openblas
#openblas
#set(OpenBLAS_INSTALL_PREFIX ${fc_patch}/OpenBLAS)
set
(
OpenBLAS_INSTALL_PREFIX
${
fc_patch
}
/OpenBLAS
)
#set(OpenBLAS_SOURCE_DIR ${fc_patch}/OpenBLAS-src)
set
(
OpenBLAS_SOURCE_DIR
${
fc_patch
}
/OpenBLAS-src
)
#ExternalProject_Add(
set
(
OpenBLAS_PREFIX
${
fc_patch
}
/OpenBLAS-prefix
)
# OpenBLAS
ExternalProject_Add
(
# GIT_REPOSITORY https://github.com/xianyi/OpenBLAS
OpenBLAS
# GIT_TAG v0.3.13
GIT_REPOSITORY https://github.com/xianyi/OpenBLAS
# GIT_SHALLOW TRUE
GIT_TAG 1ef97c470ccf23d06d3bb0597c52df4a2e9093b9
# GIT_PROGRESS TRUE
GIT_SHALLOW TRUE
# CONFIGURE_COMMAND ""
GIT_PROGRESS TRUE
# BUILD_IN_SOURCE TRUE
PREFIX
${
OpenBLAS_PREFIX
}
# BUILD_COMMAND make USE_LOCKING=1 USE_THREAD=0
SOURCE_DIR
${
OpenBLAS_SOURCE_DIR
}
# INSTALL_COMMAND make PREFIX=${OpenBLAS_INSTALL_PREFIX} install
BUILD_IN_SOURCE TRUE
# UPDATE_DISCONNECTED TRUE
CONFIGURE_COMMAND
""
#)
BUILD_COMMAND make
INSTALL_COMMAND make PREFIX=
${
OpenBLAS_INSTALL_PREFIX
}
install
UPDATE_DISCONNECTED TRUE
)
link_directories
(
${
OpenBLAS_INSTALL_PREFIX
}
/lib
)
include_directories
(
${
OpenBLAS_INSTALL_PREFIX
}
/include
)
link_directories
(
/usr/local/gcc-8.2/lib64
)
add_subdirectory
(
speechx
)
###############################################################################
###############################################################################
# Add local library
# Add local library
...
...
speechx/build.sh
0 → 100644
浏览文件 @
cd3c57d5
#!/usr/bin/env bash
boost_SOURCE_DIR
=
$PWD
/fc_patch/boost-src
if
[
!
-d
${
boost_SOURCE_DIR
}
]
;
then
wget https://boostorg.jfrog.io/artifactory/main/release/1.75.0/source/boost_1_75_0.tar.gz
tar
xzfv boost_1_75_0.tar.gz
mkdir
-p
$PWD
/fc_patch
mv
boost_1_75_0
${
boost_SOURCE_DIR
}
cd
${
boost_SOURCE_DIR
}
bash ./bootstrap.sh
./b2
cd
-
echo
-e
"
\n
"
fi
mkdir
build
cd
build
cmake ..
-DBOOST_ROOT
:STRING
=
${
boost_SOURCE_DIR
}
make
cd
-
speechx/speechx/CMakeLists.txt
浏览文件 @
cd3c57d5
...
@@ -33,7 +33,7 @@ ${CMAKE_CURRENT_SOURCE_DIR}/decoder
...
@@ -33,7 +33,7 @@ ${CMAKE_CURRENT_SOURCE_DIR}/decoder
add_subdirectory
(
decoder
)
add_subdirectory
(
decoder
)
add_executable
(
mfcc-test codelab/feat_test/feature-mfcc-test.cc
)
add_executable
(
mfcc-test codelab/feat_test/feature-mfcc-test.cc
)
target_link_libraries
(
mfcc-test kaldi-mfcc
${
MATH_LIB
}
)
target_link_libraries
(
mfcc-test kaldi-mfcc
)
add_executable
(
linear_spectrogram_main codelab/feat_test/linear_spectrogram_main.cc
)
add_executable
(
linear_spectrogram_main codelab/feat_test/linear_spectrogram_main.cc
)
target_link_libraries
(
linear_spectrogram_main frontend kaldi-util kaldi-feat-common gflags glog
)
target_link_libraries
(
linear_spectrogram_main frontend kaldi-util kaldi-feat-common gflags glog
)
...
...
speechx/speechx/kaldi/matrix/CMakeLists.txt
浏览文件 @
cd3c57d5
...
@@ -13,4 +13,4 @@ srfft.cc
...
@@ -13,4 +13,4 @@ srfft.cc
tp-matrix.cc
tp-matrix.cc
)
)
target_link_libraries
(
kaldi-matrix gfortran kaldi-base
${
MATH_LIB
}
)
target_link_libraries
(
kaldi-matrix gfortran kaldi-base
libopenblas.a
)
speechx/speechx/kaldi/matrix/kaldi-blas.h
浏览文件 @
cd3c57d5
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
#define HAVE_
MKL
#define HAVE_
OPENBLAS
#if (defined(HAVE_CLAPACK) && (defined(HAVE_ATLAS) || defined(HAVE_MKL))) \
#if (defined(HAVE_CLAPACK) && (defined(HAVE_ATLAS) || defined(HAVE_MKL))) \
|| (defined(HAVE_ATLAS) && defined(HAVE_MKL))
|| (defined(HAVE_ATLAS) && defined(HAVE_MKL))
...
@@ -96,8 +96,8 @@
...
@@ -96,8 +96,8 @@
#elif defined(HAVE_OPENBLAS)
#elif defined(HAVE_OPENBLAS)
// getting cblas.h and lapacke.h from <openblas-install-dir>/.
// getting cblas.h and lapacke.h from <openblas-install-dir>/.
// putting in "" not <> to search -I before system libraries.
// putting in "" not <> to search -I before system libraries.
#include "
third_party/openblas/
cblas.h"
#include "cblas.h"
#include "
third_party/openblas/
lapacke.h"
#include "lapacke.h"
#undef I
#undef I
#undef complex
#undef complex
// get rid of macros from f2c.h -- these are dangerous.
// get rid of macros from f2c.h -- these are dangerous.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录