Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
DeepSpeech
提交
138b4fe1
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看板
提交
138b4fe1
编写于
10月 18, 2022
作者:
H
Hui Zhang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix cmake paddle flags; more doc info
上级
005d0e17
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
41 addition
and
12 deletion
+41
-12
speechx/CMakeLists.txt
speechx/CMakeLists.txt
+5
-3
speechx/README.md
speechx/README.md
+4
-0
speechx/examples/README.md
speechx/examples/README.md
+26
-4
speechx/examples/codelab/README.md
speechx/examples/codelab/README.md
+3
-2
speechx/examples/codelab/u2/path.sh
speechx/examples/codelab/u2/path.sh
+1
-1
speechx/examples/u2pp_ol/README.md
speechx/examples/u2pp_ol/README.md
+1
-1
speechx/examples/u2pp_ol/wenetspeech/path.sh
speechx/examples/u2pp_ol/wenetspeech/path.sh
+1
-1
未找到文件。
speechx/CMakeLists.txt
浏览文件 @
138b4fe1
...
@@ -100,8 +100,9 @@ message(STATUS "Python3_EXECUTABLE = ${Python3_EXECUTABLE}")
...
@@ -100,8 +100,9 @@ message(STATUS "Python3_EXECUTABLE = ${Python3_EXECUTABLE}")
message
(
STATUS
"Pybind11_INCLUDES =
${
pybind11_INCLUDE_DIRS
}
, pybind11_LIBRARIES=
${
pybind11_LIBRARIES
}
, pybind11_DEFINITIONS=
${
pybind11_DEFINITIONS
}
"
)
message
(
STATUS
"Pybind11_INCLUDES =
${
pybind11_INCLUDE_DIRS
}
, pybind11_LIBRARIES=
${
pybind11_LIBRARIES
}
, pybind11_DEFINITIONS=
${
pybind11_DEFINITIONS
}
"
)
# paddle include and link option
# paddle include and link option
# -L/workspace/DeepSpeech-2.x/speechx/venv/lib/python3.7/site-packages/paddle/libs -L/workspace/DeepSpeech-2.x/speechx/venv/lib/python3.7/site-packages/paddle/fluid -l:libpaddle.so -l:libdnnl.so.2 -l:libiomp5.so
execute_process
(
execute_process
(
COMMAND python -c
"import
paddle ; print(' '.join(paddle.sysconfig.get_link_flags()), end='')
"
COMMAND python -c
"import
os; import paddle; include_dir=paddle.sysconfig.get_include(); paddle_dir=os.path.split(include_dir)[0]; libs_dir=os.path.join(paddle_dir, 'libs'); fluid_dir=os.path.join(paddle_dir, 'fluid'); out=' '.join([
\"
-L
\"
+ libs_dir,
\"
-L
\"
+ fluid_dir]); out +=
\"
-l:libpaddle.so -l:libdnnl.so.2 -l:libiomp5.so
\"
; print(out);
"
OUTPUT_VARIABLE PADDLE_LINK_FLAGS
OUTPUT_VARIABLE PADDLE_LINK_FLAGS
RESULT_VARIABLE SUCESS
)
RESULT_VARIABLE SUCESS
)
...
@@ -109,8 +110,9 @@ message(STATUS PADDLE_LINK_FLAGS= ${PADDLE_LINK_FLAGS})
...
@@ -109,8 +110,9 @@ message(STATUS PADDLE_LINK_FLAGS= ${PADDLE_LINK_FLAGS})
string
(
STRIP
${
PADDLE_LINK_FLAGS
}
PADDLE_LINK_FLAGS
)
string
(
STRIP
${
PADDLE_LINK_FLAGS
}
PADDLE_LINK_FLAGS
)
# paddle compile option
# paddle compile option
# -I/workspace/DeepSpeech-2.x/speechx/venv/lib/python3.7/site-packages/paddle/include
execute_process
(
execute_process
(
COMMAND python -c
"import paddle
; print(' '.join(paddle.sysconfig.get_compile_flags()), end='')
"
COMMAND python -c
"import paddle
; include_dir = paddle.sysconfig.get_include(); print(f
\"
-I{include_dir}
\"
);
"
OUTPUT_VARIABLE PADDLE_COMPILE_FLAGS
)
OUTPUT_VARIABLE PADDLE_COMPILE_FLAGS
)
message
(
STATUS PADDLE_COMPILE_FLAGS=
${
PADDLE_COMPILE_FLAGS
}
)
message
(
STATUS PADDLE_COMPILE_FLAGS=
${
PADDLE_COMPILE_FLAGS
}
)
string
(
STRIP
${
PADDLE_COMPILE_FLAGS
}
PADDLE_COMPILE_FLAGS
)
string
(
STRIP
${
PADDLE_COMPILE_FLAGS
}
PADDLE_COMPILE_FLAGS
)
...
@@ -119,7 +121,7 @@ string(STRIP ${PADDLE_COMPILE_FLAGS} PADDLE_COMPILE_FLAGS)
...
@@ -119,7 +121,7 @@ string(STRIP ${PADDLE_COMPILE_FLAGS} PADDLE_COMPILE_FLAGS)
# for LD_LIBRARY_PATH
# for LD_LIBRARY_PATH
# set(PADDLE_LIB_DIRS /workspace/DeepSpeech-2.x/tools/venv/lib/python3.7/site-packages/paddle/fluid:/workspace/DeepSpeech-2.x/tools/venv/lib/python3.7/site-packages/paddle/libs/)
# set(PADDLE_LIB_DIRS /workspace/DeepSpeech-2.x/tools/venv/lib/python3.7/site-packages/paddle/fluid:/workspace/DeepSpeech-2.x/tools/venv/lib/python3.7/site-packages/paddle/libs/)
execute_process
(
execute_process
(
COMMAND python -c
"import
paddle ; print(':'.join(paddle.sysconfig.get_lib()), end='')
"
COMMAND python -c
"import
os; import paddle; include_dir=paddle.sysconfig.get_include(); paddle_dir=os.path.split(include_dir)[0]; libs_dir=os.path.join(paddle_dir, 'libs'); fluid_dir=os.path.join(paddle_dir, 'fluid'); out=':'.join([libs_dir, fluid_dir]); print(out);
"
OUTPUT_VARIABLE PADDLE_LIB_DIRS
)
OUTPUT_VARIABLE PADDLE_LIB_DIRS
)
message
(
STATUS PADDLE_LIB_DIRS=
${
PADDLE_LIB_DIRS
}
)
message
(
STATUS PADDLE_LIB_DIRS=
${
PADDLE_LIB_DIRS
}
)
...
...
speechx/README.md
浏览文件 @
138b4fe1
...
@@ -35,11 +35,15 @@ bash tools/venv.sh
...
@@ -35,11 +35,15 @@ bash tools/venv.sh
2.
Build
`speechx`
and
`examples`
.
2.
Build
`speechx`
and
`examples`
.
For now we using feature under
`develop`
branch of paddle, so we need install
`paddlepaddle`
nightly build version.
For example:
```
```
source venv/bin/activate
source venv/bin/activate
python -m pip install paddlepaddle==0.0.0 -f https://www.paddlepaddle.org.cn/whl/linux/cpu-mkl/develop.html
./build.sh
./build.sh
```
```
3.
Go to
`examples`
to have a fun.
3.
Go to
`examples`
to have a fun.
More details please see
`README.md`
under
`examples`
.
More details please see
`README.md`
under
`examples`
.
...
...
speechx/examples/README.md
浏览文件 @
138b4fe1
# Examples for SpeechX
# Examples for SpeechX
> `u2pp_ol` is recommended.
*
`u2pp_ol`
- u2++ streaming asr test under
`aishell-1`
test dataset.
*
`ds2_ol`
- ds2 streaming test under
`aishell-1`
test dataset.
*
`ds2_ol`
- ds2 streaming test under
`aishell-1`
test dataset.
## How to run
## How to run
`run.sh`
is the entry point.
### Create env
Using
`tools/evn.sh`
under
`speechx`
to create python env.
```
bash tools/env.sh
```
Source env before play with example.
```
. venv/bin/activate
```
### Play with example
`run.sh`
is the entry point for every example.
Example to play
`
ds2
_ol`
:
Example to play
`
u2pp
_ol`
:
```
```
pushd
ds2_ol/aishell
pushd
u2pp_ol/wenetspeech
bash run.sh
bash run.sh
--stop_stage 4
```
```
## Display Model with [Netron](https://github.com/lutzroeder/netron)
## Display Model with [Netron](https://github.com/lutzroeder/netron)
If you have a model, we can using this commnd to show model graph.
For example:
```
```
pip install netron
pip install netron
netron exp/deepspeech2_online/checkpoints/avg_1.jit.pdmodel --port 8022 --host 10.21.55.20
netron exp/deepspeech2_online/checkpoints/avg_1.jit.pdmodel --port 8022 --host 10.21.55.20
...
...
speechx/examples/codelab/README.md
浏览文件 @
138b4fe1
# Codelab
# Codelab
## introduction
> The below is for developing and offline testing.
> Do not run it only if you know what it is.
> The below is for developing and offline testing. Do not run it only if you know what it is.
*
nnet
*
nnet
*
feat
*
feat
*
decoder
*
decoder
*
u2
speechx/examples/codelab/u2/path.sh
浏览文件 @
138b4fe1
...
@@ -14,5 +14,5 @@ export LC_AL=C
...
@@ -14,5 +14,5 @@ export LC_AL=C
export
PATH
=
$PATH
:
$TOOLS_BIN
:
$SPEECHX_BUILD
/nnet:
$SPEECHX_BUILD
/decoder:
$SPEECHX_BUILD
/frontend/audio:
$SPEECHX_BUILD
/recognizer
export
PATH
=
$PATH
:
$TOOLS_BIN
:
$SPEECHX_BUILD
/nnet:
$SPEECHX_BUILD
/decoder:
$SPEECHX_BUILD
/frontend/audio:
$SPEECHX_BUILD
/recognizer
PADDLE_LIB_PATH
=
$(
python
-c
"import
paddle ; print(':'.join(paddle.sysconfig.get_lib()), end='')
"
)
PADDLE_LIB_PATH
=
$(
python
-c
"import
os; import paddle; include_dir=paddle.sysconfig.get_include(); paddle_dir=os.path.split(include_dir)[0]; libs_dir=os.path.join(paddle_dir, 'libs'); fluid_dir=os.path.join(paddle_dir, 'fluid'); out=':'.join([libs_dir, fluid_dir]); print(out);
"
)
export
LD_LIBRARY_PATH
=
$PADDLE_LIB_PATH
:
$LD_LIBRARY_PATH
export
LD_LIBRARY_PATH
=
$PADDLE_LIB_PATH
:
$LD_LIBRARY_PATH
speechx/examples/u2pp_ol/README.md
浏览文件 @
138b4fe1
...
@@ -2,4 +2,4 @@
...
@@ -2,4 +2,4 @@
## Examples
## Examples
*
`wenetspeech`
- Streaming Decoding
using
wenetspeech u2/u2++ model. Using aishell test data for testing.
*
`wenetspeech`
- Streaming Decoding
with
wenetspeech u2/u2++ model. Using aishell test data for testing.
speechx/examples/u2pp_ol/wenetspeech/path.sh
浏览文件 @
138b4fe1
...
@@ -14,5 +14,5 @@ export LC_AL=C
...
@@ -14,5 +14,5 @@ export LC_AL=C
export
PATH
=
$PATH
:
$TOOLS_BIN
:
$SPEECHX_BUILD
/nnet:
$SPEECHX_BUILD
/decoder:
$SPEECHX_BUILD
/frontend/audio:
$SPEECHX_BUILD
/recognizer
export
PATH
=
$PATH
:
$TOOLS_BIN
:
$SPEECHX_BUILD
/nnet:
$SPEECHX_BUILD
/decoder:
$SPEECHX_BUILD
/frontend/audio:
$SPEECHX_BUILD
/recognizer
PADDLE_LIB_PATH
=
$(
python
-c
"import
paddle ; print(':'.join(paddle.sysconfig.get_lib()), end='')
"
)
PADDLE_LIB_PATH
=
$(
python
-c
"import
os; import paddle; include_dir=paddle.sysconfig.get_include(); paddle_dir=os.path.split(include_dir)[0]; libs_dir=os.path.join(paddle_dir, 'libs'); fluid_dir=os.path.join(paddle_dir, 'fluid'); out=':'.join([libs_dir, fluid_dir]); print(out);
"
)
export
LD_LIBRARY_PATH
=
$PADDLE_LIB_PATH
:
$LD_LIBRARY_PATH
export
LD_LIBRARY_PATH
=
$PADDLE_LIB_PATH
:
$LD_LIBRARY_PATH
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录