From 3ae77ca75d7cb35285205c0ba98dfc066522f3a2 Mon Sep 17 00:00:00 2001 From: Olaf Thiele Date: Mon, 23 Nov 2020 19:55:27 +0100 Subject: [PATCH] Conditional msg for missing lm.binary added --- native_client/generate_scorer_package.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/native_client/generate_scorer_package.cpp b/native_client/generate_scorer_package.cpp index 4486b42cb9..4513a0f8df 100644 --- a/native_client/generate_scorer_package.cpp +++ b/native_client/generate_scorer_package.cpp @@ -68,7 +68,8 @@ create_package(absl::optional alphabet_path, int err = scorer.load_lm(lm_path); if (err != DS_ERR_SCORER_NO_TRIE) { cerr << "Error loading language model file: " - << DS_ErrorCodeToErrorMessage(err) << "\n"; + << (err == DS_ERR_SCORER_UNREADABLE ? "Can't open binary LM file." : DS_ErrorCodeToErrorMessage(err)) + << "\n"; return 1; } scorer.fill_dictionary(words);