Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
DeepSpeech
提交
36af34b2
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看板
提交
36af34b2
编写于
10月 18, 2022
作者:
H
Hui Zhang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add DecoderBase and license
上级
138b4fe1
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
16 addition
and
3 deletion
+16
-3
speechx/speechx/decoder/ctc_beam_search_decoder.h
speechx/speechx/decoder/ctc_beam_search_decoder.h
+1
-1
speechx/speechx/decoder/ctc_prefix_beam_search_decoder.h
speechx/speechx/decoder/ctc_prefix_beam_search_decoder.h
+4
-1
speechx/speechx/decoder/ctc_prefix_beam_search_score.h
speechx/speechx/decoder/ctc_prefix_beam_search_score.h
+2
-0
speechx/speechx/decoder/ctc_tlg_decoder.h
speechx/speechx/decoder/ctc_tlg_decoder.h
+1
-1
speechx/speechx/decoder/decoder_itf.h
speechx/speechx/decoder/decoder_itf.h
+3
-0
speechx/speechx/nnet/u2_nnet.cc
speechx/speechx/nnet/u2_nnet.cc
+3
-0
speechx/speechx/nnet/u2_nnet.h
speechx/speechx/nnet/u2_nnet.h
+2
-0
未找到文件。
speechx/speechx/decoder/ctc_beam_search_decoder.h
浏览文件 @
36af34b2
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
namespace
ppspeech
{
namespace
ppspeech
{
class
CTCBeamSearch
:
public
Decoder
Interfac
e
{
class
CTCBeamSearch
:
public
Decoder
Bas
e
{
public:
public:
explicit
CTCBeamSearch
(
const
CTCBeamSearchOptions
&
opts
);
explicit
CTCBeamSearch
(
const
CTCBeamSearchOptions
&
opts
);
~
CTCBeamSearch
()
{}
~
CTCBeamSearch
()
{}
...
...
speechx/speechx/decoder/ctc_prefix_beam_search_decoder.h
浏览文件 @
36af34b2
// Copyright (c) 2020 Mobvoi Inc (Binbin Zhang)
// Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
// Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// Licensed under the Apache License, Version 2.0 (the "License");
...
@@ -12,6 +13,8 @@
...
@@ -12,6 +13,8 @@
// 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.
// modified from https://github.com/wenet-e2e/wenet/blob/main/runtime/core/decoder/ctc_prefix_beam_search.cc
#pragma once
#pragma once
#include "decoder/ctc_beam_search_opt.h"
#include "decoder/ctc_beam_search_opt.h"
...
@@ -21,7 +24,7 @@
...
@@ -21,7 +24,7 @@
namespace
ppspeech
{
namespace
ppspeech
{
class
ContextGraph
;
class
ContextGraph
;
class
CTCPrefixBeamSearch
:
public
Decoder
Interfac
e
{
class
CTCPrefixBeamSearch
:
public
Decoder
Bas
e
{
public:
public:
explicit
CTCPrefixBeamSearch
(
const
std
::
string
vocab_path
,
explicit
CTCPrefixBeamSearch
(
const
std
::
string
vocab_path
,
const
CTCBeamSearchOptions
&
opts
);
const
CTCBeamSearchOptions
&
opts
);
...
...
speechx/speechx/decoder/ctc_prefix_beam_search_score.h
浏览文件 @
36af34b2
...
@@ -13,6 +13,8 @@
...
@@ -13,6 +13,8 @@
// 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.
// modified from https://github.com/wenet-e2e/wenet/blob/main/runtime/core/decoder/ctc_prefix_beam_search.h
#pragma once
#pragma once
#include "base/common.h"
#include "base/common.h"
...
...
speechx/speechx/decoder/ctc_tlg_decoder.h
浏览文件 @
36af34b2
...
@@ -54,7 +54,7 @@ struct TLGDecoderOptions {
...
@@ -54,7 +54,7 @@ struct TLGDecoderOptions {
}
}
};
};
class
TLGDecoder
:
public
Decoder
Interfac
e
{
class
TLGDecoder
:
public
Decoder
Bas
e
{
public:
public:
explicit
TLGDecoder
(
TLGDecoderOptions
opts
);
explicit
TLGDecoder
(
TLGDecoderOptions
opts
);
~
TLGDecoder
()
=
default
;
~
TLGDecoder
()
=
default
;
...
...
speechx/speechx/decoder/decoder_itf.h
浏览文件 @
36af34b2
...
@@ -51,7 +51,10 @@ class DecoderInterface {
...
@@ -51,7 +51,10 @@ class DecoderInterface {
virtual
std
::
vector
<
std
::
pair
<
double
,
std
::
string
>>
GetNBestPath
()
=
0
;
virtual
std
::
vector
<
std
::
pair
<
double
,
std
::
string
>>
GetNBestPath
()
=
0
;
virtual
std
::
vector
<
std
::
pair
<
double
,
std
::
string
>>
GetNBestPath
(
int
n
)
=
0
;
virtual
std
::
vector
<
std
::
pair
<
double
,
std
::
string
>>
GetNBestPath
(
int
n
)
=
0
;
};
class
DecoderBase
:
public
DecoderInterface
{
protected:
// start from one
// start from one
int
NumFrameDecoded
()
{
return
num_frame_decoded_
+
1
;
}
int
NumFrameDecoded
()
{
return
num_frame_decoded_
+
1
;
}
...
...
speechx/speechx/nnet/u2_nnet.cc
浏览文件 @
36af34b2
// Copyright 2022 Horizon Robotics. All Rights Reserved.
// Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
// Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// Licensed under the Apache License, Version 2.0 (the "License");
...
@@ -12,6 +13,8 @@
...
@@ -12,6 +13,8 @@
// 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.
// modified from https://github.com/wenet-e2e/wenet/blob/main/runtime/core/decoder/asr_model.cc
#include "nnet/u2_nnet.h"
#include "nnet/u2_nnet.h"
#ifdef USE_PROFILING
#ifdef USE_PROFILING
...
...
speechx/speechx/nnet/u2_nnet.h
浏览文件 @
36af34b2
// Copyright 2022 Horizon Robotics. All Rights Reserved.
// Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
// Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// Licensed under the Apache License, Version 2.0 (the "License");
...
@@ -12,6 +13,7 @@
...
@@ -12,6 +13,7 @@
// 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.
// modified from https://github.com/wenet-e2e/wenet/blob/main/runtime/core/decoder/asr_model.h
#pragma once
#pragma once
#include "base/common.h"
#include "base/common.h"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录