Skip to content

Commit f4e7b73

Browse files
author
LittleMouse
committed
[fix] ASR output empty
1 parent c89412e commit f4e7b73

File tree

1 file changed

+3
-3
lines changed
  • projects/llm_framework/main_asr/src

1 file changed

+3
-3
lines changed

projects/llm_framework/main_asr/src/main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ class llm_task {
543543
bool is_endpoint = ncnn_recognizer_->IsEndpoint(ncnn_stream_.get());
544544
if (is_endpoint) {
545545
ncnn_stream_->Finalize();
546-
if ((!lower_text.empty()) && out_callback_) {
546+
if (out_callback_) {
547547
out_callback_(lower_text, true);
548548
}
549549
ncnn_stream_.reset();
@@ -638,7 +638,7 @@ class llm_task {
638638
}
639639

640640
if (silence_ms_accum_ >= silence_timeout) {
641-
if (!pending_text_.empty() && out_callback_) {
641+
if (out_callback_) {
642642
out_callback_(pending_text_, true);
643643
}
644644
pending_text_.clear();
@@ -689,7 +689,7 @@ class llm_task {
689689
bool is_endpoint = onnx_online_recognizer_->IsEndpoint(online_stream.get());
690690

691691
if (is_endpoint) {
692-
if ((!lower_text.empty()) && out_callback_) {
692+
if (out_callback_) {
693693
out_callback_(lower_text, true);
694694
}
695695
online_stream.reset();

0 commit comments

Comments
 (0)