- fix broken cached model loading - cache validated TAR models instead of gzip responses - add proper fireEv bridge for wasm/js events - fix recognizer initialization callbacks - fix Embind waveform return type handling - stabilize acceptWaveform in minified builds - add optional debug logging
24 lines
846 B
C++
24 lines
846 B
C++
#pragma once
|
|
#include "CommonModel.h"
|
|
#include <queue>
|
|
|
|
// Prevent naming conflicts with Vosk's Recognizer class
|
|
#define Recognizer Recognizer_
|
|
struct Recognizer
|
|
{
|
|
int index;
|
|
VoskRecognizer *rec;
|
|
Recognizer(int index, float sampleRate, CommonModel *model);
|
|
Recognizer(int index, float sampleRate, CommonModel *model, CommonModel *spkModel);
|
|
Recognizer(int index, float sampleRate, CommonModel *model, const std::string &grm, int);
|
|
std::string acceptWaveform(int start, int len);
|
|
void reset();
|
|
void setEndpointerMode(VoskEndpointerMode mode);
|
|
void setEndpointerDelays(float tStartMax, float tEnd, float tMax);
|
|
void setSpkModel(CommonModel *model);
|
|
void setGrm(const std::string &grm);
|
|
void setWords(bool words);
|
|
void setPartialWords(bool partialWords);
|
|
void setNLSML(bool nlsml);
|
|
void setMaxAlternatives(int alts);
|
|
}; |