Overload constructor of recognizer, maximal debug configuration

This commit is contained in:
msqr1
2024-02-20 23:12:08 -08:00
parent 0f9cf2916e
commit a0898a6bf1
10 changed files with 13883 additions and 49 deletions

View File

@@ -3,9 +3,6 @@
#include "spkModel.h"
#include "global.h"
#include <filesystem>
namespace fs = std::filesystem;
struct recognizer {
std::atomic_flag done{};
std::atomic_flag controller{};
@@ -13,7 +10,11 @@ struct recognizer {
int index{};
VoskRecognizer* rec{};
recognizer(model* model, float sampleRate, int index);
recognizer(model* model, spkModel* spkModel, float sampleRate, int index);
recognizer(model* model, const std::string& grm, float sampleRate, int index, int dummy);
~recognizer();
void finishConstruction();
void tryStealMdlThrd(std::function<void()>&& main, model* mdl);
void acceptWaveForm();
void setSpkModel(spkModel* model);
void setGrm(const std::string& grm);