Draft 2 (failed)
This commit is contained in:
@@ -2,6 +2,13 @@
|
||||
#include "model.h"
|
||||
#include "recognizer.h"
|
||||
using namespace emscripten;
|
||||
int main() {
|
||||
//vosk_set_log_level(-1);
|
||||
std::thread t{[](){
|
||||
wasmfs_create_directory("/opfs",0777,wasmfs_create_opfs_backend());
|
||||
}};
|
||||
t.detach();
|
||||
}
|
||||
EMSCRIPTEN_BINDINGS() {
|
||||
function("setLogLevel", &vosk_set_log_level, allow_raw_pointers());
|
||||
class_<model>("__model__")
|
||||
@@ -14,7 +21,6 @@ EMSCRIPTEN_BINDINGS() {
|
||||
.constructor<model*, int, int>(allow_raw_pointers())
|
||||
.function("start", &recognizer::start, allow_raw_pointers())
|
||||
.function("stop", &recognizer::stop, allow_raw_pointers())
|
||||
.function("deinit", &recognizer::deinit, allow_raw_pointers())
|
||||
.function("setWords", &recognizer::setWords, allow_raw_pointers())
|
||||
.function("setPartialWords", &recognizer::setPartialWords, allow_raw_pointers())
|
||||
.function("setGrm", &recognizer::setGrm, allow_raw_pointers())
|
||||
|
||||
Reference in New Issue
Block a user