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
Fangjun Kuang
2025-09-04 15:01:20 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
GitHub
2025-09-04 15:01:20 +0800
Commit
1568ac27eb59f37e1399e965485311d6efc794c1
1568ac27
1 parent
e254c38f
Avoid appending blanks for Cantonese vits tts. (#2559)
显示空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
0 行增加
和
8 行删除
sherpa-onnx/csrc/lexicon.cc
sherpa-onnx/csrc/lexicon.cc
查看文件 @
1568ac2
...
...
@@ -190,11 +190,6 @@ std::vector<TokenIDs> Lexicon::ConvertTextToTokenIdsChinese(
std
::
vector
<
TokenIDs
>
ans
;
std
::
vector
<
int64_t
>
this_sentence
;
int32_t
blank
=
-
1
;
if
(
token2id_
.
count
(
" "
))
{
blank
=
token2id_
.
at
(
" "
);
}
int32_t
sil
=
-
1
;
int32_t
eos
=
-
1
;
if
(
token2id_
.
count
(
"sil"
))
{
...
...
@@ -249,9 +244,6 @@ std::vector<TokenIDs> Lexicon::ConvertTextToTokenIdsChinese(
const
auto
&
token_ids
=
word2ids_
.
at
(
w
);
this_sentence
.
insert
(
this_sentence
.
end
(),
token_ids
.
begin
(),
token_ids
.
end
());
if
(
blank
!=
-
1
)
{
this_sentence
.
push_back
(
blank
);
}
}
if
(
sil
!=
-
1
)
{
...
...
请
注册
或
登录
后发表评论