Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
DeepSpeech
提交
82120c5c
D
DeepSpeech
项目概览
PaddlePaddle
/
DeepSpeech
大约 1 年 前同步成功
通知
206
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
82120c5c
编写于
10月 20, 2021
作者:
H
Hui Zhang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
setup.py install cpp deps
上级
4081633b
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
51 addition
and
38 deletion
+51
-38
requirements.txt
requirements.txt
+3
-3
setup.cfg
setup.cfg
+9
-0
setup.py
setup.py
+27
-22
tools/extras/install_autolog.sh
tools/extras/install_autolog.sh
+12
-13
未找到文件。
requirements.txt
浏览文件 @
82120c5c
...
...
@@ -19,12 +19,12 @@ tqdm
typeguard
visualdl
==2.2.0
yacs
numpy
numpy
==1.20.0
numba
nltk
inflect
librosa
unidecode
numba
llvmlite
matplotlib
pandas
...
...
setup.cfg
0 → 100644
浏览文件 @
82120c5c
[build_ext]
debug=0
[metadata]
license_file = LICENSE
description-file = README.md
[magformat]
formatters=yapf
setup.py
浏览文件 @
82120c5c
...
...
@@ -14,6 +14,7 @@
import
io
import
os
import
re
import
sys
from
pathlib
import
Path
import
contextlib
import
inspect
...
...
@@ -31,9 +32,7 @@ HERE = Path(os.path.abspath(os.path.dirname(__file__)))
def
pushd
(
new_dir
):
old_dir
=
os
.
getcwd
()
os
.
chdir
(
new_dir
)
try
:
yield
finally
:
os
.
chdir
(
old_dir
)
...
...
@@ -43,7 +42,7 @@ def read(*names, **kwargs):
return
fp
.
read
()
def
check_call
(
cmd
:
str
,
shell
=
Tru
e
,
executable
=
None
):
def
check_call
(
cmd
:
str
,
shell
=
Fals
e
,
executable
=
None
):
try
:
sp
.
check_call
(
cmd
.
split
(),
shell
=
shell
,
...
...
@@ -53,49 +52,55 @@ def check_call(cmd: str, shell=True, executable=None):
f
"
{
__file__
}
:
{
inspect
.
currentframe
().
f_lineno
}
: CMD:
{
cmd
}
, Error:"
,
e
.
output
,
file
=
sys
.
stderr
)
raise
e
def
_pre_install
():
def
_pre_install
(
install_lib_dir
):
# apt
check_call
(
"apt-get update -y"
)
check_call
(
"apt-get update -y"
,
False
)
check_call
(
"apt-get install -y "
+
'vim tig tree sox pkg-config '
+
'libsndfile1 libflac-dev libogg-dev '
+
'libvorbis-dev libboost-dev swig python3-dev '
)
'libvorbis-dev libboost-dev swig python3-dev '
,
False
)
print
(
"apt install."
)
# tools/make
tool_dir
=
HERE
/
"tools"
#
for f in tool_dir.glob("*.done"):
#
f.unlink()
for
f
in
tool_dir
.
glob
(
"*.done"
):
f
.
unlink
()
with
pushd
(
tool_dir
):
check_call
(
"make"
)
print
(
"tools install."
)
# install autolog
tools_extrs_dir
=
HERE
/
'tools/extras'
with
pushd
(
tools_extrs_dir
):
check_call
(
f
"bash -e install_autolog.sh"
)
print
(
"autolog install."
)
def
_post_install
(
install_lib_dir
):
# ctcdecoder
ctcdecoder_dir
=
HERE
/
'deepspeech/decoders/ctcdecoder/swig'
with
puahd
(
ctcdecoder_dir
):
check_call
(
"setup.sh"
)
with
pushd
(
ctcdecoder_dir
):
check_call
(
"bash -e setup.sh"
)
print
(
"ctcdecoder install."
)
def
_post_install
(
install_lib_dir
):
# install third_party
third_party_dir
=
HERE
/
'third_party'
with
puahd
(
third_party_dir
):
check_call
(
"bash install.sh"
)
# install autolog
tools_extrs_dir
=
HERE
/
'tools/extras'
with
puahd
(
tools_extrs_dir
):
check_call
(
"bash install_autolog.sh"
)
with
pushd
(
third_party_dir
):
check_call
(
"bash -e install.sh"
)
print
(
"third_party install."
)
class
DevelopCommand
(
develop
):
def
run
(
self
):
_pre_install
(
)
self
.
execute
(
_pre_install
,
(
self
.
install_lib
,
),
msg
=
"Pre Install..."
)
develop
.
run
(
self
)
self
.
execute
(
_post_install
,
(
self
.
install_lib
,
),
msg
=
"Post Install..."
)
class
InstallCommand
(
install
):
def
run
(
self
):
_pre_install
(
)
self
.
execute
(
_pre_install
,
(
self
.
install_lib
,
),
msg
=
"Pre Install..."
)
install
.
run
(
self
)
self
.
execute
(
_post_install
,
(
self
.
install_lib
,
),
msg
=
"Post Install..."
)
...
...
tools/extras/install_autolog.sh
100644 → 100755
浏览文件 @
82120c5c
#!/bin/bash
#install auto-log
python
-c
"import auto_log"
echo
"Install auto_log into default system path"
test
-d
AutoLog
||
git clone https://github.com/LDOUBLEV/AutoLog
if
[
$?
!=
0
]
;
then
info_msg
"Install auto_log into default system path"
test
-d
AutoLog
||
git clone https://github.com/LDOUBLEV/AutoLog
if
[
$?
!=
0
]
;
then
error_msg
"Download auto_log failed !!!"
exit
1
fi
cd
AutoLog
pip
install
-r
requirements.txt
python setup.py
install
cd
..
rm
-rf
AutoLog
fi
pushd
AutoLog
pip
install
-r
requirements.txt
python setup.py
install
popd
rm
-rf
AutoLog
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录