Fix style issues (#1458)

This commit is contained in:
Fangjun Kuang
2024-10-24 11:15:08 +08:00
committed by GitHub
parent ceb69ebd94
commit b3e05f6dc4
55 changed files with 155 additions and 117 deletions

View File

@@ -6,6 +6,7 @@
#define SHERPA_ONNX_CSRC_LEXICON_H_
#include <cstdint>
#include <istream>
#include <memory>
#include <string>
#include <unordered_map>
@@ -66,6 +67,12 @@ class Lexicon : public OfflineTtsFrontend {
bool debug_ = false;
};
std::unordered_map<std::string, int32_t> ReadTokens(std::istream &is);
std::vector<int32_t> ConvertTokensToIds(
const std::unordered_map<std::string, int32_t> &token2id,
const std::vector<std::string> &tokens);
} // namespace sherpa_onnx
#endif // SHERPA_ONNX_CSRC_LEXICON_H_