Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
DeepSpeech
提交
88f9c818
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,发现更多精彩内容 >>
提交
88f9c818
编写于
2月 14, 2022
作者:
W
WilliamZhang06
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixed comments, test=doc
上级
c2eb9ad2
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
7 addition
and
12 deletion
+7
-12
speechserving/speechserving/engine/asr/python/asr_engine.py
speechserving/speechserving/engine/asr/python/asr_engine.py
+0
-1
speechserving/speechserving/engine/engine_factory.py
speechserving/speechserving/engine/engine_factory.py
+4
-1
speechserving/speechserving/restful/asr_api.py
speechserving/speechserving/restful/asr_api.py
+1
-1
speechserving/tests/16_audio.wav
speechserving/tests/16_audio.wav
+0
-0
speechserving/tests/http_client.py
speechserving/tests/http_client.py
+2
-9
未找到文件。
speechserving/speechserving/engine/asr/python/asr_engine.py
浏览文件 @
88f9c818
...
...
@@ -81,7 +81,6 @@ class ASRServerExecutor(ASRExecutor):
"""
audio_file
=
input
# logger.info("Preprocess audio_file:" + audio_file)
# Get the object for feature extraction
if
"deepspeech2online"
in
model_type
or
"deepspeech2offline"
in
model_type
:
...
...
speechserving/speechserving/engine/engine_factory.py
浏览文件 @
88f9c818
...
...
@@ -11,15 +11,18 @@
# 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.
from
typing
import
Text
from
engine.asr.python.asr_engine
import
ASREngine
from
engine.tts.python.tts_engine
import
TTSEngine
__all__
=
[
'EngineFactory'
]
class
EngineFactory
(
object
):
@
staticmethod
def
get_engine
(
engine_name
:
str
):
def
get_engine
(
engine_name
:
Text
):
if
engine_name
==
'asr'
:
return
ASREngine
()
elif
engine_name
==
'tts'
:
...
...
speechserving/speechserving/restful/asr_api.py
浏览文件 @
88f9c818
...
...
@@ -42,7 +42,7 @@ def help():
"global"
:
"success"
},
"result"
:
{
"description"
:
"
tts
server"
,
"description"
:
"
asr
server"
,
"input"
:
"base64 string of wavfile"
,
"output"
:
"transcription"
}
...
...
speechserving/tests/16_audio.wav
0 → 100644
浏览文件 @
88f9c818
文件已添加
speechserving/tests/http_client.py
浏览文件 @
88f9c818
...
...
@@ -14,10 +14,8 @@ import requests
import
json
import
time
import
base64
import
soundfile
import
io
import
argparse
def
readwav2base64
(
wav_file
):
"""
...
...
@@ -29,7 +27,7 @@ def readwav2base64(wav_file):
return
base64_string
def
main
(
args
):
def
main
():
"""
main func
"""
...
...
@@ -58,9 +56,4 @@ def main(args):
if
__name__
==
"__main__"
:
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
"--model_type"
,
action
=
"store"
,
help
=
"model type: u2, dp2"
,
default
=
"dp2"
)
args
=
parser
.
parse_args
()
main
(
args
)
main
()
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录