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
2024-04-16 09:17:23 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
GitHub
2024-04-16 09:17:23 +0800
Commit
81b7f1d529cd4475b6d31e66335fd40ed0ac47bb
81b7f1d5
1 parent
fb4aee83
Fix display for sherpa-onnx-microphone (#773)
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
2 行增加
和
3 行删除
sherpa-onnx/csrc/sherpa-onnx-microphone.cc
sherpa-onnx/csrc/sherpa-onnx-microphone.cc
查看文件 @
81b7f1d
...
...
@@ -148,7 +148,7 @@ for a list of pre-trained models to download.
std
::
string
last_text
;
int32_t
segment_index
=
0
;
sherpa_onnx
::
Display
display
;
sherpa_onnx
::
Display
display
(
30
)
;
while
(
!
stop
)
{
while
(
recognizer
.
IsReady
(
s
.
get
()))
{
recognizer
.
DecodeStream
(
s
.
get
());
...
...
@@ -163,14 +163,13 @@ for a list of pre-trained models to download.
std
::
transform
(
text
.
begin
(),
text
.
end
(),
text
.
begin
(),
[](
auto
c
)
{
return
std
::
tolower
(
c
);
});
fprintf
(
stderr
,
"
\r
%d: %s"
,
segment_index
,
text
.
c_str
()
);
display
.
Print
(
segment_index
,
text
);
fflush
(
stderr
);
}
if
(
is_endpoint
)
{
if
(
!
text
.
empty
())
{
++
segment_index
;
fprintf
(
stderr
,
"
\n
"
);
}
recognizer
.
Reset
(
s
.
get
());
...
...
请
注册
或
登录
后发表评论