Skip to content

Commit

Permalink
fix building
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj committed Jan 11, 2025
1 parent 6d856d8 commit f31073b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sherpa/cpp_api/offline-recognizer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ void OfflineRecognizerConfig::Register(ParseOptions *po) {
"Used only when decoding_method is modified_beam_search.");
}

void OfflineRecognizerConfig::Validate() {
void OfflineRecognizerConfig::Validate() const {
if (tokens.empty()) {
SHERPA_LOG(FATAL) << "Please provide --tokens";
}
Expand Down
5 changes: 3 additions & 2 deletions sherpa/cpp_api/offline-recognizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ struct OfflineRecognizerConfig {

FastBeamSearchConfig fast_beam_search_config;

OfflineModelConfig model;
// TODO(fangjun): We will remmove mutable later
mutable OfflineModelConfig model;

/// Path to the torchscript model
std::string nn_model;
Expand Down Expand Up @@ -79,7 +80,7 @@ struct OfflineRecognizerConfig {

void Register(ParseOptions *po);

void Validate();
void Validate() const;

/** A string representation for debugging purpose. */
std::string ToString() const;
Expand Down

0 comments on commit f31073b

Please sign in to comment.