Print a more user-friendly error message when using --hotwords-file. (#344)

This commit is contained in:
Fangjun Kuang
2023-09-26 11:04:20 +08:00
committed by GitHub
parent 9091917eab
commit 33a5765169
6 changed files with 38 additions and 5 deletions

View File

@@ -156,8 +156,9 @@ class OnlineRecognizerTransducerImpl : public OnlineRecognizerImpl {
bool has_context_graph = false;
for (int32_t i = 0; i != n; ++i) {
if (!has_context_graph && ss[i]->GetContextGraph())
if (!has_context_graph && ss[i]->GetContextGraph()) {
has_context_graph = true;
}
const auto num_processed_frames = ss[i]->GetNumProcessedFrames();
std::vector<float> features =