mirror of
https://github.com/mozilla/DeepSpeech.git
synced 2025-10-26 11:19:39 +00:00
Squashed commits: [2941b47] Fixed nits [700572e] Restored old CTC decoder API [5aaf75d] Fixed nits [969d71a] Added a destructor for DecoderState [af0be6e] Removed accumulated_logits [9dcb7b4] CTC beam search streaming decoder
23 lines
447 B
C++
23 lines
447 B
C++
#ifndef DECODERSTATE_H_
|
|
#define DECODERSTATE_H_
|
|
|
|
#include <vector>
|
|
|
|
/* Struct for the state of the decoder, containing the prefixes and initial root prefix plus state variables. */
|
|
|
|
struct DecoderState {
|
|
int space_id;
|
|
int blank_id;
|
|
std::vector<PathTrie*> prefixes;
|
|
PathTrie *prefix_root;
|
|
|
|
~DecoderState() {
|
|
if (prefix_root != nullptr) {
|
|
delete prefix_root;
|
|
}
|
|
prefix_root = nullptr;
|
|
}
|
|
};
|
|
|
|
#endif // DECODERSTATE_H_
|