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
2023-02-25 14:30:44 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
GitHub
2023-02-25 14:30:44 +0800
Commit
fb1e24bebb7f64df54299b470342200ea4ebd97e
fb1e24be
1 parent
e4b79ad3
Fix endpointing with microphone (#64)
隐藏空白字符变更
内嵌
并排对比
正在显示
4 个修改的文件
包含
15 行增加
和
6 行删除
ffmpeg-examples/sherpa-onnx-ffmpeg.c
python-api-examples/speech-recognition-from-microphone-with-endpoint-detection.py
sherpa-onnx/csrc/sherpa-onnx-alsa.cc
sherpa-onnx/csrc/sherpa-onnx-microphone.cc
ffmpeg-examples/sherpa-onnx-ffmpeg.c
查看文件 @
fb1e24b
...
...
@@ -232,6 +232,8 @@ static void sherpa_decode_frame(const AVFrame *frame, SherpaOnnxOnlineRecognizer
fprintf
(
stderr
,
"%s
\n
"
,
r
->
text
);
}
DestroyOnlineRecognizerResult
(
r
);
Reset
(
recognizer
,
stream
);
}
nb_samples
=
0
;
}
...
...
python-api-examples/speech-recognition-from-microphone-with-endpoint-detection.py
查看文件 @
fb1e24b
...
...
@@ -68,8 +68,9 @@ def main():
last_result
=
result
print
(
f
"{segment_id}: {result}"
)
if
result
and
is_endpoint
:
segment_id
+=
1
if
is_endpoint
:
if
result
:
segment_id
+=
1
recognizer
.
reset
(
stream
)
...
...
sherpa-onnx/csrc/sherpa-onnx-alsa.cc
查看文件 @
fb1e24b
...
...
@@ -132,8 +132,11 @@ as the device_name.
display
.
Print
(
segment_index
,
text
);
}
if
(
!
text
.
empty
()
&&
is_endpoint
)
{
++
segment_index
;
if
(
is_endpoint
)
{
if
(
!
text
.
empty
())
{
++
segment_index
;
}
recognizer
.
Reset
(
stream
.
get
());
}
}
...
...
sherpa-onnx/csrc/sherpa-onnx-microphone.cc
查看文件 @
fb1e24b
...
...
@@ -147,8 +147,11 @@ for a list of pre-trained models to download.
display
.
Print
(
segment_index
,
text
);
}
if
(
!
text
.
empty
()
&&
is_endpoint
)
{
++
segment_index
;
if
(
is_endpoint
)
{
if
(
!
text
.
empty
())
{
++
segment_index
;
}
recognizer
.
Reset
(
s
.
get
());
}
...
...
请
注册
或
登录
后发表评论