Add C++ runtime for non-streaming faster conformer transducer from NeMo. (#854)

This commit is contained in:
Fangjun Kuang
2024-05-10 12:15:39 +08:00
committed by GitHub
parent 5d8c35e44e
commit 17cd3a5f01
31 changed files with 1093 additions and 153 deletions

View File

@@ -40,14 +40,16 @@ class SymbolTable {
int32_t operator[](const std::string &sym) const;
/// Return true if there is a symbol with the given ID.
bool contains(int32_t id) const;
bool Contains(int32_t id) const;
/// Return true if there is a given symbol in the symbol table.
bool contains(const std::string &sym) const;
bool Contains(const std::string &sym) const;
// for tokens.txt from Whisper
void ApplyBase64Decode();
int32_t NumSymbols() const { return id2sym_.size(); }
private:
void Init(std::istream &is);