Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
xuning
/
sherpaonnx
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
yh646492956
2024-05-10 15:41:42 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
GitHub
2024-05-10 15:41:42 +0800
Commit
1eb60e8711f5affa59cc9e59f8c2d61f6cab01a6
1eb60e87
1 parent
17cd3a5f
Solve the issue of missing the last sentence with punctuation (#856)
Co-authored-by: Hao You <13182720519@sina.cn>
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
2 行增加
和
1 行删除
sherpa-onnx/csrc/offline-punctuation-ct-transformer-impl.h
sherpa-onnx/csrc/offline-punctuation-ct-transformer-impl.h
查看文件 @
1eb60e8
...
...
@@ -8,6 +8,7 @@
#include <string>
#include <utility>
#include <vector>
#include <math.h>
#if __ANDROID_API__ >= 9
#include "android/asset_manager.h"
...
...
@@ -60,7 +61,7 @@ class OfflinePunctuationCtTransformerImpl : public OfflinePunctuationImpl {
int32_t
segment_size
=
20
;
int32_t
max_len
=
200
;
int32_t
num_segments
=
(
token_ids
.
size
()
+
segment_size
-
1
)
/
segment_size
;
int32_t
num_segments
=
ceil
(((
float
)
token_ids
.
size
()
+
segment_size
-
1
)
/
segment_size
)
;
std
::
vector
<
int32_t
>
punctuations
;
int32_t
last
=
-
1
;
...
...
请
注册
或
登录
后发表评论