Fix licence and restructure, prepare to add AudioWorklet

This commit is contained in:
msqr1
2024-01-20 17:37:47 -08:00
parent 6bc5f4061d
commit 6da9a662a1
14 changed files with 94 additions and 104 deletions

View File

@@ -1,27 +1,26 @@
#pragma once
#include "model.h"
#include "spkModel.h"
#include "genericObj.h"
#include <filesystem>
#include <atomic>
#include <thread>
#include <emscripten/bind.h>
#include <emscripten/wasmfs.h>
#include <emscripten/console.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);
namespace fs = std::filesystem;
struct recognizer {
int index{};
VoskRecognizer* rec{};
void acceptWaveForm(float* data, int len);
recognizer(model* model, float sampleRate, int index);
~recognizer();
void acceptWaveForm(float* data, int len);
void fireEv(const char* type, const char* content);
void setSpkModel(spkModel* model);
void setGrm(const std::string& grm);