Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
DeepSpeech
提交
6dedb63e
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看板
未验证
提交
6dedb63e
编写于
12月 08, 2021
作者:
H
Hui Zhang
提交者:
GitHub
12月 08, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1087 from Jackwaterveg/setup
[ctcdecoders] Separate the ctcdecoders
上级
eccf6edd
9fe0beee
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
62 addition
and
5 deletion
+62
-5
paddlespeech/s2t/decoders/__init__.py
paddlespeech/s2t/decoders/__init__.py
+0
-1
paddlespeech/s2t/models/ds2/__init__.py
paddlespeech/s2t/models/ds2/__init__.py
+12
-0
paddlespeech/s2t/models/ds2_online/__init__.py
paddlespeech/s2t/models/ds2_online/__init__.py
+12
-0
paddlespeech/s2t/modules/ctc.py
paddlespeech/s2t/modules/ctc.py
+15
-3
paddlespeech/s2t/utils/dynamic_pip_install.py
paddlespeech/s2t/utils/dynamic_pip_install.py
+22
-0
setup.py
setup.py
+1
-1
未找到文件。
paddlespeech/s2t/decoders/__init__.py
浏览文件 @
6dedb63e
...
@@ -11,4 +11,3 @@
...
@@ -11,4 +11,3 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
from
.ctcdecoder
import
swig_wrapper
paddlespeech/s2t/models/ds2/__init__.py
浏览文件 @
6dedb63e
...
@@ -13,5 +13,17 @@
...
@@ -13,5 +13,17 @@
# limitations under the License.
# limitations under the License.
from
.deepspeech2
import
DeepSpeech2InferModel
from
.deepspeech2
import
DeepSpeech2InferModel
from
.deepspeech2
import
DeepSpeech2Model
from
.deepspeech2
import
DeepSpeech2Model
from
paddlespeech.s2t.utils
import
dynamic_pip_install
try
:
import
swig_decoders
except
:
try
:
package_name
=
'paddlespeech_ctcdecoders'
dynamic_pip_install
.
install
(
package_name
)
except
:
raise
RuntimeError
(
"Can not install package paddlespeech_ctcdecoders on your system.
\
The DeepSpeech2 model is not supported for your system"
)
__all__
=
[
'DeepSpeech2Model'
,
'DeepSpeech2InferModel'
]
__all__
=
[
'DeepSpeech2Model'
,
'DeepSpeech2InferModel'
]
paddlespeech/s2t/models/ds2_online/__init__.py
浏览文件 @
6dedb63e
...
@@ -13,5 +13,17 @@
...
@@ -13,5 +13,17 @@
# limitations under the License.
# limitations under the License.
from
.deepspeech2
import
DeepSpeech2InferModelOnline
from
.deepspeech2
import
DeepSpeech2InferModelOnline
from
.deepspeech2
import
DeepSpeech2ModelOnline
from
.deepspeech2
import
DeepSpeech2ModelOnline
from
paddlespeech.s2t.utils
import
dynamic_pip_install
try
:
import
swig_decoders
except
:
try
:
package_name
=
'paddlespeech_ctcdecoders'
dynamic_pip_install
.
install
(
package_name
)
except
:
raise
RuntimeError
(
"Can not install package paddlespeech_ctcdecoders on your system.
\
The DeepSpeech2 model is not supported for your system"
)
__all__
=
[
'DeepSpeech2ModelOnline'
,
'DeepSpeech2InferModelOnline'
]
__all__
=
[
'DeepSpeech2ModelOnline'
,
'DeepSpeech2InferModelOnline'
]
paddlespeech/s2t/modules/ctc.py
浏览文件 @
6dedb63e
...
@@ -28,8 +28,20 @@ try:
...
@@ -28,8 +28,20 @@ try:
from
paddlespeech.s2t.decoders.ctcdecoder.swig_wrapper
import
ctc_beam_search_decoder_batch
# noqa: F401
from
paddlespeech.s2t.decoders.ctcdecoder.swig_wrapper
import
ctc_beam_search_decoder_batch
# noqa: F401
from
paddlespeech.s2t.decoders.ctcdecoder.swig_wrapper
import
ctc_greedy_decoder
# noqa: F401
from
paddlespeech.s2t.decoders.ctcdecoder.swig_wrapper
import
ctc_greedy_decoder
# noqa: F401
from
paddlespeech.s2t.decoders.ctcdecoder.swig_wrapper
import
Scorer
# noqa: F401
from
paddlespeech.s2t.decoders.ctcdecoder.swig_wrapper
import
Scorer
# noqa: F401
except
Exception
as
e
:
except
:
logger
.
info
(
"ctcdecoder not installed!"
)
try
:
from
paddlespeech.s2t.utils
import
dynamic_pip_install
package_name
=
'paddlespeech_ctcdecoders'
dynamic_pip_install
.
install
(
package_name
)
from
paddlespeech.s2t.decoders.ctcdecoder.swig_wrapper
import
ctc_beam_search_decoder_batch
# noqa: F401
from
paddlespeech.s2t.decoders.ctcdecoder.swig_wrapper
import
ctc_greedy_decoder
# noqa: F401
from
paddlespeech.s2t.decoders.ctcdecoder.swig_wrapper
import
Scorer
# noqa: F401
except
Exception
as
e
:
logger
.
info
(
"paddlespeech_ctcdecoders not installed!"
)
#try:
#except Exception as e:
# logger.info("ctcdecoder not installed!")
__all__
=
[
'CTCDecoder'
]
__all__
=
[
'CTCDecoder'
]
...
...
paddlespeech/s2t/utils/dynamic_pip_install.py
0 → 100644
浏览文件 @
6dedb63e
# Copyright (c) 2021 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.
import
pip
def
install
(
package_name
):
if
int
(
pip
.
__version__
.
split
(
'.'
)[
0
])
>
9
:
from
pip._internal
import
main
else
:
from
pip
import
main
main
([
'install'
,
package_name
])
setup.py
浏览文件 @
6dedb63e
...
@@ -45,7 +45,6 @@ requirements = {
...
@@ -45,7 +45,6 @@ requirements = {
"nltk"
,
"nltk"
,
"pandas"
,
"pandas"
,
"paddleaudio"
,
"paddleaudio"
,
"paddlespeech_ctcdecoders"
,
"paddlespeech_feat"
,
"paddlespeech_feat"
,
"praatio~=4.1"
,
"praatio~=4.1"
,
"pypi-kenlm"
,
"pypi-kenlm"
,
...
@@ -71,6 +70,7 @@ requirements = {
...
@@ -71,6 +70,7 @@ requirements = {
"ConfigArgParse"
,
"ConfigArgParse"
,
"coverage"
,
"coverage"
,
"gpustat"
,
"gpustat"
,
"paddlespeech_ctcdecoders"
,
"phkit"
,
"phkit"
,
"Pillow"
,
"Pillow"
,
"pybind11"
,
"pybind11"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录