Nothing is working but it is on the right track! ASYNCIFY removed, manual waiting instead and some proxying logic

This commit is contained in:
msqr1
2024-01-28 00:09:16 -08:00
parent efb56e19f9
commit 8796f35445
22 changed files with 239 additions and 7375 deletions

View File

@@ -1,20 +1,17 @@
#pragma once
#include "model.h"
#include "spkModel.h"
#include "global.h"
#include <filesystem>
#include <atomic>
#include <thread>
#include <emscripten/wasmfs.h>
#include <emscripten/webaudio.h>
#include <AL/al.h>
#include <AL/alc.h>
#include <archive.h>
#include <archive_entry.h>
extern void throwJS(const char* msg, bool err = false);
#include <emscripten/proxying.h>
namespace fs = std::filesystem;
using namespace emscripten;
struct recognizer {
std::atomic_flag done{};
std::mutex controller{};
@@ -24,7 +21,7 @@ struct recognizer {
recognizer(model* model, float sampleRate, int index);
~recognizer();
void acceptWaveForm();
void fireEv(const char* type, const char* content);
void fireEv(const char* type, const char* content, const pthread_t& caller);
void setSpkModel(spkModel* model);
void setGrm(const std::string& grm);
void setWords(bool words);