Add C++ example for real-time ASR with nvidia/parakeet-tdt-0.6b-v2. (#2201)
This commit is contained in:
@@ -14,7 +14,8 @@ class SherpaDisplay {
|
||||
void UpdateText(const std::string &text) { current_text_ = text; }
|
||||
|
||||
void FinalizeCurrentSentence() {
|
||||
if (!current_text_.empty() && current_text_[0] != ' ') {
|
||||
if (!current_text_.empty() &&
|
||||
(current_text_[0] != ' ' || current_text_.size() > 1)) {
|
||||
sentences_.push_back({GetCurrentDateTime(), std::move(current_text_)});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user