Refactor offline recognizer. (#94)

* Refactor offline recognizer.

The purpose is to make it easier to support different types of models.
This commit is contained in:
Fangjun Kuang
2023-03-27 14:59:40 +08:00
committed by GitHub
parent 5572246253
commit dffb0fd43c
9 changed files with 283 additions and 134 deletions

View File

@@ -80,6 +80,12 @@ bool SplitStringToIntegers(const std::string &full, const char *delim,
return true;
}
// This is defined for F = float and double.
template <class F>
bool SplitStringToFloats(const std::string &full, const char *delim,
bool omit_empty_strings, // typically false
std::vector<F> *out);
} // namespace sherpa_onnx
#endif // SHERPA_ONNX_CSRC_TEXT_UTILS_H_