mirror of
https://github.com/mozilla/DeepSpeech.git
synced 2025-10-26 11:19:39 +00:00
24 lines
464 B
C++
24 lines
464 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 time_step;
|
|
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_
|