Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
DeepSpeech
提交
b26c1efe
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看板
未验证
提交
b26c1efe
编写于
1月 24, 2022
作者:
Y
YangZhou
提交者:
GitHub
1月 24, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add glog gflags gtest openfst&base_types, test=doc (#1382)
上级
1840aba3
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
132 addition
and
5 deletion
+132
-5
speechx/CMakeLists.txt
speechx/CMakeLists.txt
+45
-1
speechx/speechx/base/basic_types.h
speechx/speechx/base/basic_types.h
+60
-0
speechx/speechx/base/macros.h
speechx/speechx/base/macros.h
+23
-0
speechx/speechx/kaldi/base/kaldi-types.h
speechx/speechx/kaldi/base/kaldi-types.h
+4
-4
未找到文件。
speechx/CMakeLists.txt
浏览文件 @
b26c1efe
cmake_minimum_required
(
VERSION 3.14 FATAL_ERROR
)
cmake_minimum_required
(
VERSION 3.14 FATAL_ERROR
)
project
(
deep
speech VERSION 0.1
)
project
(
paddle
speech VERSION 0.1
)
set
(
CMAKE_VERBOSE_MAKEFILE on
)
set
(
CMAKE_VERBOSE_MAKEFILE on
)
# set std-14
# set std-14
...
@@ -49,6 +49,50 @@ FetchContent_Declare(
...
@@ -49,6 +49,50 @@ FetchContent_Declare(
)
)
FetchContent_MakeAvailable
(
libsndfile
)
FetchContent_MakeAvailable
(
libsndfile
)
# gflags
FetchContent_Declare
(
gflags
URL https://github.com/gflags/gflags/archive/v2.2.1.zip
URL_HASH SHA256=4e44b69e709c826734dbbbd5208f61888a2faf63f239d73d8ba0011b2dccc97a
)
FetchContent_MakeAvailable
(
gflags
)
include_directories
(
${
gflags_BINARY_DIR
}
/include
)
# glog
FetchContent_Declare
(
glog
URL https://github.com/google/glog/archive/v0.4.0.zip
URL_HASH SHA256=9e1b54eb2782f53cd8af107ecf08d2ab64b8d0dc2b7f5594472f3bd63ca85cdc
)
FetchContent_MakeAvailable
(
glog
)
include_directories
(
${
glog_BINARY_DIR
}
)
# gtest
FetchContent_Declare
(
googletest
URL https://github.com/google/googletest/archive/release-1.10.0.zip
URL_HASH SHA256=94c634d499558a76fa649edb13721dce6e98fb1e7018dfaeba3cd7a083945e91
)
FetchContent_MakeAvailable
(
googletest
)
# openfst
set
(
openfst_SOURCE_DIR
${
fc_patch
}
/openfst-src
)
set
(
openfst_BINARY_DIR
${
fc_patch
}
/openfst-build
)
set
(
openfst_PREFIX_DIR
${
fc_patch
}
/openfst-subbuild/openfst-populate-prefix
)
ExternalProject_Add
(
openfst
URL https://github.com/mjansche/openfst/archive/refs/tags/1.7.2.zip
URL_HASH SHA256=ffc56931025579a8af3515741c0f3b0fc3a854c023421472c07ca0c6389c75e6
SOURCE_DIR
${
openfst_SOURCE_DIR
}
BINARY_DIR
${
openfst_BINARY_DIR
}
CONFIGURE_COMMAND
${
openfst_SOURCE_DIR
}
/configure --prefix=
${
openfst_PREFIX_DIR
}
"CPPFLAGS=-I
${
gflags_BINARY_DIR
}
/include -I
${
glog_SOURCE_DIR
}
/src -I
${
glog_BINARY_DIR
}
"
"LDFLAGS=-L
${
gflags_BINARY_DIR
}
-L
${
glog_BINARY_DIR
}
"
"LIBS=-lgflags_nothreads -lglog -lpthread"
BUILD_COMMAND make -j 4
)
add_dependencies
(
openfst gflags glog
)
link_directories
(
${
openfst_PREFIX_DIR
}
/lib
)
include_directories
(
${
openfst_PREFIX_DIR
}
/include
)
add_subdirectory
(
speechx
)
add_subdirectory
(
speechx
)
#openblas
#openblas
...
...
speechx/speechx/base/basic_types.h
0 → 100644
浏览文件 @
b26c1efe
// Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#pragma once
#include "kaldi/base/kaldi-types.h"
#include <limits.h>
typedef
float
BaseFloat
;
typedef
double
double64
;
typedef
signed
char
int8
;
typedef
short
int16
;
typedef
int
int32
;
#if defined(__LP64__) && !defined(OS_MACOSX) && !defined(OS_OPENBSD)
typedef
long
int64
;
#else
typedef
long
long
int64
;
#endif
typedef
unsigned
char
uint8
;
typedef
unsigned
short
uint16
;
typedef
unsigned
int
uint32
;
if
defined
(
__LP64__
)
&&
!
defined
(
OS_MACOSX
)
&&
!
defined
(
OS_OPENBSD
)
typedef
unsigned
long
uint64
;
#else
typedef
unsigned
long
long
uint64
;
#endif
typedef
signed
int
char32
;
const
uint8
kuint8max
=
((
uint8
)
0xFF
);
const
uint16
kuint16max
=
((
uint16
)
0xFFFF
);
const
uint32
kuint32max
=
((
uint32
)
0xFFFFFFFF
);
const
uint64
kuint64max
=
((
uint64
)
(
0xFFFFFFFFFFFFFFFFLL
));
const
int8
kint8min
=
((
int8
)
0x80
);
const
int8
kint8max
=
((
int8
)
0x7F
);
const
int16
kint16min
=
((
int16
)
0x8000
);
const
int16
kint16max
=
((
int16
)
0x7FFF
);
const
int32
kint32min
=
((
int32
)
0x80000000
);
const
int32
kint32max
=
((
int32
)
0x7FFFFFFF
);
const
int64
kint64min
=
((
int64
)
(
0x8000000000000000LL
));
const
int64
kint64max
=
((
int64
)
(
0x7FFFFFFFFFFFFFFFLL
));
const
BaseFloat
kBaseFloatMax
=
std
::
numeric_limits
<
BaseFloat
>::
max
();
const
BaseFloat
kBaseFloatMin
=
std
::
numeric_limits
<
BaseFloat
>::
min
();
speechx/speechx/base/macros.h
0 → 100644
浏览文件 @
b26c1efe
// Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#pragma once
namespace
ppspeech
{
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
TypeName(const TypeName&) = delete; \
void operator=(const TypeName&) = delete
}
// namespace pp_speech
\ No newline at end of file
speechx/speechx/kaldi/base/kaldi-types.h
浏览文件 @
b26c1efe
...
@@ -41,7 +41,7 @@ typedef float BaseFloat;
...
@@ -41,7 +41,7 @@ typedef float BaseFloat;
// for discussion on what to do if you need compile kaldi
// for discussion on what to do if you need compile kaldi
// without OpenFST, see the bottom of this this file
// without OpenFST, see the bottom of this this file
/*
#include <fst/types.h>
#include <fst/types.h>
namespace
kaldi
{
namespace
kaldi
{
...
@@ -54,10 +54,10 @@ namespace kaldi {
...
@@ -54,10 +54,10 @@ namespace kaldi {
typedef
float
float32
;
typedef
float
float32
;
typedef
double
double64
;
typedef
double
double64
;
}
// end namespace kaldi
}
// end namespace kaldi
*/
// In a theoretical case you decide compile Kaldi without the OpenFST
// In a theoretical case you decide compile Kaldi without the OpenFST
// comment the previous namespace statement and uncomment the following
// comment the previous namespace statement and uncomment the following
/*
namespace kaldi {
namespace kaldi {
typedef int8_t int8;
typedef int8_t int8;
typedef int16_t int16;
typedef int16_t int16;
...
@@ -71,6 +71,6 @@ namespace kaldi {
...
@@ -71,6 +71,6 @@ namespace kaldi {
typedef float float32;
typedef float float32;
typedef double double64;
typedef double double64;
} // end namespace kaldi
} // end namespace kaldi
*/
#endif // KALDI_BASE_KALDI_TYPES_H_
#endif // KALDI_BASE_KALDI_TYPES_H_
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录