Draft 2 (failed)

This commit is contained in:
msqr1
2024-01-18 23:47:10 -08:00
parent 97ba7ee1b8
commit 91a21271d5
22 changed files with 350 additions and 299 deletions

View File

@@ -1,12 +1,15 @@
#include "spkModel.h"
spkModel::spkModel(const std::string &url, const std::string& storepath, const std::string& id, int index) : genericModel(url, storepath, id, index) {
if(!loadModel()) return;
if(!loadModel(storepath)) return;
mdl = vosk_spk_model_new(".");
if(mdl == nullptr) {
fireEv("error", "Unable to initialize speaker model");
}
fireEv("ready");
};
spkModel::~spkModel() {
vosk_spk_model_free(mdl);
}
bool spkModel::checkModel() {
return fs::exists("mfcc.conf") &&
fs::exists("final.ext.raw") &&