omnivad 0.2.8 → 0.2.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,7 @@ var createOmniVAD = (() => {
6
6
  function(moduleArg = {}) {
7
7
  var moduleRtn;
8
8
 
9
- var Module=moduleArg;var readyPromiseResolve,readyPromiseReject;var readyPromise=new Promise((resolve,reject)=>{readyPromiseResolve=resolve;readyPromiseReject=reject});var ENVIRONMENT_IS_WEB=typeof window=="object";var ENVIRONMENT_IS_WORKER=typeof WorkerGlobalScope!="undefined";var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string"&&process.type!="renderer";if(ENVIRONMENT_IS_NODE){}var moduleOverrides=Object.assign({},Module);var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var readAsync,readBinary;if(ENVIRONMENT_IS_NODE){var fs=require("fs");var nodePath=require("path");scriptDirectory=__dirname+"/";readBinary=filename=>{filename=isFileURI(filename)?new URL(filename):filename;var ret=fs.readFileSync(filename);return ret};readAsync=async(filename,binary=true)=>{filename=isFileURI(filename)?new URL(filename):filename;var ret=fs.readFileSync(filename,binary?undefined:"utf8");return ret};if(!Module["thisProgram"]&&process.argv.length>1){thisProgram=process.argv[1].replace(/\\/g,"/")}arguments_=process.argv.slice(2);quit_=(status,toThrow)=>{process.exitCode=status;throw toThrow}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!="undefined"&&document.currentScript){scriptDirectory=document.currentScript.src}if(_scriptName){scriptDirectory=_scriptName}if(scriptDirectory.startsWith("blob:")){scriptDirectory=""}else{scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1)}{readAsync=async url=>{var response=await fetch(url,{credentials:"same-origin"});if(response.ok){return response.arrayBuffer()}throw new Error(response.status+" : "+response.url)}}}else{}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.error.bind(console);Object.assign(Module,moduleOverrides);moduleOverrides=null;if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];var wasmBinary=Module["wasmBinary"];var wasmMemory;var ABORT=false;var EXITSTATUS;var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateMemoryViews(){var b=wasmMemory.buffer;Module["HEAP8"]=HEAP8=new Int8Array(b);Module["HEAP16"]=HEAP16=new Int16Array(b);Module["HEAPU8"]=HEAPU8=new Uint8Array(b);Module["HEAPU16"]=HEAPU16=new Uint16Array(b);Module["HEAP32"]=HEAP32=new Int32Array(b);Module["HEAPU32"]=HEAPU32=new Uint32Array(b);Module["HEAPF32"]=HEAPF32=new Float32Array(b);Module["HEAPF64"]=HEAPF64=new Float64Array(b)}var __ATPRERUN__=[];var __ATINIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=true;callRuntimeCallbacks(__ATINIT__)}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnInit(cb){__ATINIT__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}var runDependencies=0;var dependenciesFulfilled=null;function addRunDependency(id){runDependencies++;Module["monitorRunDependencies"]?.(runDependencies)}function removeRunDependency(id){runDependencies--;Module["monitorRunDependencies"]?.(runDependencies);if(runDependencies==0){if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}function abort(what){Module["onAbort"]?.(what);what="Aborted("+what+")";err(what);ABORT=true;what+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(what);readyPromiseReject(e);throw e}var dataURIPrefix="data:application/octet-stream;base64,";var isDataURI=filename=>filename.startsWith(dataURIPrefix);var isFileURI=filename=>filename.startsWith("file://");function findWasmBinary(){var f="omnivad.wasm";if(!isDataURI(f)){return locateFile(f)}return f}var wasmBinaryFile;function getBinarySync(file){if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}throw"both async and sync fetching of the wasm failed"}async function getWasmBinary(binaryFile){if(!wasmBinary){try{var response=await readAsync(binaryFile);return new Uint8Array(response)}catch{}}return getBinarySync(binaryFile)}async function instantiateArrayBuffer(binaryFile,imports){try{var binary=await getWasmBinary(binaryFile);var instance=await WebAssembly.instantiate(binary,imports);return instance}catch(reason){err(`failed to asynchronously prepare wasm: ${reason}`);abort(reason)}}async function instantiateAsync(binary,binaryFile,imports){if(!binary&&typeof WebAssembly.instantiateStreaming=="function"&&!isDataURI(binaryFile)&&!ENVIRONMENT_IS_NODE&&typeof fetch=="function"){try{var response=fetch(binaryFile,{credentials:"same-origin"});var instantiationResult=await WebAssembly.instantiateStreaming(response,imports);return instantiationResult}catch(reason){err(`wasm streaming compile failed: ${reason}`);err("falling back to ArrayBuffer instantiation")}}return instantiateArrayBuffer(binaryFile,imports)}function getWasmImports(){return{a:wasmImports}}async function createWasm(){function receiveInstance(instance,module){wasmExports=instance.exports;wasmMemory=wasmExports["j"];updateMemoryViews();wasmTable=wasmExports["O"];addOnInit(wasmExports["k"]);removeRunDependency("wasm-instantiate");return wasmExports}addRunDependency("wasm-instantiate");function receiveInstantiationResult(result){receiveInstance(result["instance"])}var info=getWasmImports();if(Module["instantiateWasm"]){try{return Module["instantiateWasm"](info,receiveInstance)}catch(e){err(`Module.instantiateWasm callback failed with error: ${e}`);readyPromiseReject(e)}}wasmBinaryFile??=findWasmBinary();try{var result=await instantiateAsync(wasmBinary,wasmBinaryFile,info);receiveInstantiationResult(result);return result}catch(e){readyPromiseReject(e);return}}class ExitStatus{name="ExitStatus";constructor(status){this.message=`Program terminated with exit(${status})`;this.status=status}}var callRuntimeCallbacks=callbacks=>{while(callbacks.length>0){callbacks.shift()(Module)}};function getValue(ptr,type="i8"){if(type.endsWith("*"))type="*";switch(type){case"i1":return HEAP8[ptr];case"i8":return HEAP8[ptr];case"i16":return HEAP16[ptr>>1];case"i32":return HEAP32[ptr>>2];case"i64":abort("to do getValue(i64) use WASM_BIGINT");case"float":return HEAPF32[ptr>>2];case"double":return HEAPF64[ptr>>3];case"*":return HEAPU32[ptr>>2];default:abort(`invalid type for getValue: ${type}`)}}var noExitRuntime=Module["noExitRuntime"]||true;function setValue(ptr,value,type="i8"){if(type.endsWith("*"))type="*";switch(type){case"i1":HEAP8[ptr]=value;break;case"i8":HEAP8[ptr]=value;break;case"i16":HEAP16[ptr>>1]=value;break;case"i32":HEAP32[ptr>>2]=value;break;case"i64":abort("to do setValue(i64) use WASM_BIGINT");case"float":HEAPF32[ptr>>2]=value;break;case"double":HEAPF64[ptr>>3]=value;break;case"*":HEAPU32[ptr>>2]=value;break;default:abort(`invalid type for setValue: ${type}`)}}var stackRestore=val=>__emscripten_stack_restore(val);var stackSave=()=>_emscripten_stack_get_current();var wasmTable;var getWasmTableEntry=funcPtr=>wasmTable.get(funcPtr);var ___call_sighandler=(fp,sig)=>getWasmTableEntry(fp)(sig);var __abort_js=()=>abort("");var runtimeKeepaliveCounter=0;var __emscripten_runtime_keepalive_clear=()=>{noExitRuntime=false;runtimeKeepaliveCounter=0};var timers={};var handleException=e=>{if(e instanceof ExitStatus||e=="unwind"){return EXITSTATUS}quit_(1,e)};var keepRuntimeAlive=()=>noExitRuntime||runtimeKeepaliveCounter>0;var _proc_exit=code=>{EXITSTATUS=code;if(!keepRuntimeAlive()){Module["onExit"]?.(code);ABORT=true}quit_(code,new ExitStatus(code))};var exitJS=(status,implicit)=>{EXITSTATUS=status;_proc_exit(status)};var _exit=exitJS;var maybeExit=()=>{if(!keepRuntimeAlive()){try{_exit(EXITSTATUS)}catch(e){handleException(e)}}};var callUserCallback=func=>{if(ABORT){return}try{func();maybeExit()}catch(e){handleException(e)}};var _emscripten_get_now=()=>performance.now();var __setitimer_js=(which,timeout_ms)=>{if(timers[which]){clearTimeout(timers[which].id);delete timers[which]}if(!timeout_ms)return 0;var id=setTimeout(()=>{delete timers[which];callUserCallback(()=>__emscripten_timeout(which,_emscripten_get_now()))},timeout_ms);timers[which]={id,timeout_ms};return 0};var getHeapMax=()=>2147483648;var alignMemory=(size,alignment)=>Math.ceil(size/alignment)*alignment;var growMemory=size=>{var b=wasmMemory.buffer;var pages=(size-b.byteLength+65535)/65536|0;try{wasmMemory.grow(pages);updateMemoryViews();return 1}catch(e){}};var _emscripten_resize_heap=requestedSize=>{var oldSize=HEAPU8.length;requestedSize>>>=0;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignMemory(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=growMemory(newSize);if(replacement){return true}}return false};var _fd_close=fd=>52;var convertI32PairToI53Checked=(lo,hi)=>hi+2097152>>>0<4194305-!!lo?(lo>>>0)+hi*4294967296:NaN;function _fd_seek(fd,offset_low,offset_high,whence,newOffset){var offset=convertI32PairToI53Checked(offset_low,offset_high);return 70}var printCharBuffers=[null,[],[]];var UTF8Decoder=typeof TextDecoder!="undefined"?new TextDecoder:undefined;var UTF8ArrayToString=(heapOrArray,idx=0,maxBytesToRead=NaN)=>{var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heapOrArray[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.subarray(idx,endPtr))}var str="";while(idx<endPtr){var u0=heapOrArray[idx++];if(!(u0&128)){str+=String.fromCharCode(u0);continue}var u1=heapOrArray[idx++]&63;if((u0&224)==192){str+=String.fromCharCode((u0&31)<<6|u1);continue}var u2=heapOrArray[idx++]&63;if((u0&240)==224){u0=(u0&15)<<12|u1<<6|u2}else{u0=(u0&7)<<18|u1<<12|u2<<6|heapOrArray[idx++]&63}if(u0<65536){str+=String.fromCharCode(u0)}else{var ch=u0-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}}return str};var printChar=(stream,curr)=>{var buffer=printCharBuffers[stream];if(curr===0||curr===10){(stream===1?out:err)(UTF8ArrayToString(buffer));buffer.length=0}else{buffer.push(curr)}};var UTF8ToString=(ptr,maxBytesToRead)=>ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):"";var _fd_write=(fd,iov,iovcnt,pnum)=>{var num=0;for(var i=0;i<iovcnt;i++){var ptr=HEAPU32[iov>>2];var len=HEAPU32[iov+4>>2];iov+=8;for(var j=0;j<len;j++){printChar(fd,HEAPU8[ptr+j])}num+=len}HEAPU32[pnum>>2]=num;return 0};var getCFunc=ident=>{var func=Module["_"+ident];return func};var writeArrayToMemory=(array,buffer)=>{HEAP8.set(array,buffer)};var lengthBytesUTF8=str=>{var len=0;for(var i=0;i<str.length;++i){var c=str.charCodeAt(i);if(c<=127){len++}else if(c<=2047){len+=2}else if(c>=55296&&c<=57343){len+=4;++i}else{len+=3}}return len};var stringToUTF8Array=(str,heap,outIdx,maxBytesToWrite)=>{if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i<str.length;++i){var u=str.charCodeAt(i);if(u>=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx};var stringToUTF8=(str,outPtr,maxBytesToWrite)=>stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite);var stackAlloc=sz=>__emscripten_stack_alloc(sz);var stringToUTF8OnStack=str=>{var size=lengthBytesUTF8(str)+1;var ret=stackAlloc(size);stringToUTF8(str,ret,size);return ret};var ccall=(ident,returnType,argTypes,args,opts)=>{var toC={string:str=>{var ret=0;if(str!==null&&str!==undefined&&str!==0){ret=stringToUTF8OnStack(str)}return ret},array:arr=>{var ret=stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret}};function convertReturnValue(ret){if(returnType==="string"){return UTF8ToString(ret)}if(returnType==="boolean")return Boolean(ret);return ret}var func=getCFunc(ident);var cArgs=[];var stack=0;if(args){for(var i=0;i<args.length;i++){var converter=toC[argTypes[i]];if(converter){if(stack===0)stack=stackSave();cArgs[i]=converter(args[i])}else{cArgs[i]=args[i]}}}var ret=func(...cArgs);function onDone(ret){if(stack!==0)stackRestore(stack);return convertReturnValue(ret)}ret=onDone(ret);return ret};var cwrap=(ident,returnType,argTypes,opts)=>{var numericArgs=!argTypes||argTypes.every(type=>type==="number"||type==="boolean");var numericRet=returnType!=="string";if(numericRet&&numericArgs&&!opts){return getCFunc(ident)}return(...args)=>ccall(ident,returnType,argTypes,args,opts)};var wasmImports={c:___call_sighandler,i:__abort_js,e:__emscripten_runtime_keepalive_clear,f:__setitimer_js,g:_emscripten_resize_heap,h:_fd_close,b:_fd_seek,a:_fd_write,d:_proc_exit};var wasmExports;createWasm();var ___wasm_call_ctors=()=>(___wasm_call_ctors=wasmExports["k"])();var _omni_post_config_default=Module["_omni_post_config_default"]=a0=>(_omni_post_config_default=Module["_omni_post_config_default"]=wasmExports["l"])(a0);var _omni_aed_post_config_default=Module["_omni_aed_post_config_default"]=a0=>(_omni_aed_post_config_default=Module["_omni_aed_post_config_default"]=wasmExports["m"])(a0);var _omni_error_string=Module["_omni_error_string"]=a0=>(_omni_error_string=Module["_omni_error_string"]=wasmExports["n"])(a0);var _omni_free=Module["_omni_free"]=a0=>(_omni_free=Module["_omni_free"]=wasmExports["o"])(a0);var _free=Module["_free"]=a0=>(_free=Module["_free"]=wasmExports["p"])(a0);var _omni_stream_vad_config_default=Module["_omni_stream_vad_config_default"]=a0=>(_omni_stream_vad_config_default=Module["_omni_stream_vad_config_default"]=wasmExports["q"])(a0);var _omni_stream_vad_create_from_buffer=Module["_omni_stream_vad_create_from_buffer"]=(a0,a1,a2,a3)=>(_omni_stream_vad_create_from_buffer=Module["_omni_stream_vad_create_from_buffer"]=wasmExports["r"])(a0,a1,a2,a3);var _omni_stream_vad_clone=Module["_omni_stream_vad_clone"]=(a0,a1)=>(_omni_stream_vad_clone=Module["_omni_stream_vad_clone"]=wasmExports["s"])(a0,a1);var _omni_stream_vad_process=Module["_omni_stream_vad_process"]=(a0,a1,a2,a3)=>(_omni_stream_vad_process=Module["_omni_stream_vad_process"]=wasmExports["t"])(a0,a1,a2,a3);var _omni_stream_vad_detect_full=Module["_omni_stream_vad_detect_full"]=(a0,a1,a2,a3,a4)=>(_omni_stream_vad_detect_full=Module["_omni_stream_vad_detect_full"]=wasmExports["u"])(a0,a1,a2,a3,a4);var _omni_stream_vad_detect_full_int16=Module["_omni_stream_vad_detect_full_int16"]=(a0,a1,a2,a3,a4)=>(_omni_stream_vad_detect_full_int16=Module["_omni_stream_vad_detect_full_int16"]=wasmExports["v"])(a0,a1,a2,a3,a4);var _omni_stream_vad_reset=Module["_omni_stream_vad_reset"]=a0=>(_omni_stream_vad_reset=Module["_omni_stream_vad_reset"]=wasmExports["w"])(a0);var _omni_stream_vad_get_frame_offset=Module["_omni_stream_vad_get_frame_offset"]=a0=>(_omni_stream_vad_get_frame_offset=Module["_omni_stream_vad_get_frame_offset"]=wasmExports["x"])(a0);var _omni_stream_vad_destroy=Module["_omni_stream_vad_destroy"]=a0=>(_omni_stream_vad_destroy=Module["_omni_stream_vad_destroy"]=wasmExports["y"])(a0);var _omni_vad_create_from_buffer=Module["_omni_vad_create_from_buffer"]=(a0,a1,a2)=>(_omni_vad_create_from_buffer=Module["_omni_vad_create_from_buffer"]=wasmExports["z"])(a0,a1,a2);var _omni_vad_destroy=Module["_omni_vad_destroy"]=a0=>(_omni_vad_destroy=Module["_omni_vad_destroy"]=wasmExports["A"])(a0);var _omni_vad_detect=Module["_omni_vad_detect"]=(a0,a1,a2,a3,a4,a5)=>(_omni_vad_detect=Module["_omni_vad_detect"]=wasmExports["B"])(a0,a1,a2,a3,a4,a5);var _omni_vad_detect_int16=Module["_omni_vad_detect_int16"]=(a0,a1,a2,a3,a4,a5)=>(_omni_vad_detect_int16=Module["_omni_vad_detect_int16"]=wasmExports["C"])(a0,a1,a2,a3,a4,a5);var _omni_vad_detect_probs=Module["_omni_vad_detect_probs"]=(a0,a1,a2,a3,a4)=>(_omni_vad_detect_probs=Module["_omni_vad_detect_probs"]=wasmExports["D"])(a0,a1,a2,a3,a4);var _omni_vad_detect_probs_int16=Module["_omni_vad_detect_probs_int16"]=(a0,a1,a2,a3,a4)=>(_omni_vad_detect_probs_int16=Module["_omni_vad_detect_probs_int16"]=wasmExports["E"])(a0,a1,a2,a3,a4);var _omni_aed_create_from_buffer=Module["_omni_aed_create_from_buffer"]=(a0,a1,a2)=>(_omni_aed_create_from_buffer=Module["_omni_aed_create_from_buffer"]=wasmExports["F"])(a0,a1,a2);var _omni_aed_destroy=Module["_omni_aed_destroy"]=a0=>(_omni_aed_destroy=Module["_omni_aed_destroy"]=wasmExports["G"])(a0);var _omni_aed_detect=Module["_omni_aed_detect"]=(a0,a1,a2,a3,a4,a5)=>(_omni_aed_detect=Module["_omni_aed_detect"]=wasmExports["H"])(a0,a1,a2,a3,a4,a5);var _omni_aed_detect_int16=Module["_omni_aed_detect_int16"]=(a0,a1,a2,a3,a4,a5)=>(_omni_aed_detect_int16=Module["_omni_aed_detect_int16"]=wasmExports["I"])(a0,a1,a2,a3,a4,a5);var _omni_aed_detect_probs=Module["_omni_aed_detect_probs"]=(a0,a1,a2,a3,a4)=>(_omni_aed_detect_probs=Module["_omni_aed_detect_probs"]=wasmExports["J"])(a0,a1,a2,a3,a4);var _omni_aed_detect_probs_int16=Module["_omni_aed_detect_probs_int16"]=(a0,a1,a2,a3,a4)=>(_omni_aed_detect_probs_int16=Module["_omni_aed_detect_probs_int16"]=wasmExports["K"])(a0,a1,a2,a3,a4);var _malloc=Module["_malloc"]=a0=>(_malloc=Module["_malloc"]=wasmExports["L"])(a0);var _omni_chunk_config_default=Module["_omni_chunk_config_default"]=a0=>(_omni_chunk_config_default=Module["_omni_chunk_config_default"]=wasmExports["M"])(a0);var _omni_merge_chunks=Module["_omni_merge_chunks"]=(a0,a1,a2,a3,a4)=>(_omni_merge_chunks=Module["_omni_merge_chunks"]=wasmExports["N"])(a0,a1,a2,a3,a4);var __emscripten_timeout=(a0,a1)=>(__emscripten_timeout=wasmExports["P"])(a0,a1);var __emscripten_stack_restore=a0=>(__emscripten_stack_restore=wasmExports["Q"])(a0);var __emscripten_stack_alloc=a0=>(__emscripten_stack_alloc=wasmExports["R"])(a0);var _emscripten_stack_get_current=()=>(_emscripten_stack_get_current=wasmExports["S"])();Module["ccall"]=ccall;Module["cwrap"]=cwrap;Module["setValue"]=setValue;Module["getValue"]=getValue;var calledRun;dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function run(){if(runDependencies>0){return}preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();readyPromiseResolve(Module);Module["onRuntimeInitialized"]?.();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(()=>{setTimeout(()=>Module["setStatus"](""),1);doRun()},1)}else{doRun()}}if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}run();moduleRtn=readyPromise;
9
+ var Module=moduleArg;var readyPromiseResolve,readyPromiseReject;var readyPromise=new Promise((resolve,reject)=>{readyPromiseResolve=resolve;readyPromiseReject=reject});var ENVIRONMENT_IS_WEB=typeof window=="object";var ENVIRONMENT_IS_WORKER=typeof WorkerGlobalScope!="undefined";var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string"&&process.type!="renderer";if(ENVIRONMENT_IS_NODE){}var moduleOverrides=Object.assign({},Module);var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var readAsync,readBinary;if(ENVIRONMENT_IS_NODE){var fs=require("fs");var nodePath=require("path");scriptDirectory=__dirname+"/";readBinary=filename=>{filename=isFileURI(filename)?new URL(filename):filename;var ret=fs.readFileSync(filename);return ret};readAsync=async(filename,binary=true)=>{filename=isFileURI(filename)?new URL(filename):filename;var ret=fs.readFileSync(filename,binary?undefined:"utf8");return ret};if(!Module["thisProgram"]&&process.argv.length>1){thisProgram=process.argv[1].replace(/\\/g,"/")}arguments_=process.argv.slice(2);quit_=(status,toThrow)=>{process.exitCode=status;throw toThrow}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!="undefined"&&document.currentScript){scriptDirectory=document.currentScript.src}if(_scriptName){scriptDirectory=_scriptName}if(scriptDirectory.startsWith("blob:")){scriptDirectory=""}else{scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1)}{readAsync=async url=>{var response=await fetch(url,{credentials:"same-origin"});if(response.ok){return response.arrayBuffer()}throw new Error(response.status+" : "+response.url)}}}else{}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.error.bind(console);Object.assign(Module,moduleOverrides);moduleOverrides=null;if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];var wasmBinary=Module["wasmBinary"];var wasmMemory;var ABORT=false;var EXITSTATUS;var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateMemoryViews(){var b=wasmMemory.buffer;Module["HEAP8"]=HEAP8=new Int8Array(b);Module["HEAP16"]=HEAP16=new Int16Array(b);Module["HEAPU8"]=HEAPU8=new Uint8Array(b);Module["HEAPU16"]=HEAPU16=new Uint16Array(b);Module["HEAP32"]=HEAP32=new Int32Array(b);Module["HEAPU32"]=HEAPU32=new Uint32Array(b);Module["HEAPF32"]=HEAPF32=new Float32Array(b);Module["HEAPF64"]=HEAPF64=new Float64Array(b)}var __ATPRERUN__=[];var __ATINIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=true;callRuntimeCallbacks(__ATINIT__)}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnInit(cb){__ATINIT__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}var runDependencies=0;var dependenciesFulfilled=null;function addRunDependency(id){runDependencies++;Module["monitorRunDependencies"]?.(runDependencies)}function removeRunDependency(id){runDependencies--;Module["monitorRunDependencies"]?.(runDependencies);if(runDependencies==0){if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}function abort(what){Module["onAbort"]?.(what);what="Aborted("+what+")";err(what);ABORT=true;what+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(what);readyPromiseReject(e);throw e}var dataURIPrefix="data:application/octet-stream;base64,";var isDataURI=filename=>filename.startsWith(dataURIPrefix);var isFileURI=filename=>filename.startsWith("file://");function findWasmBinary(){var f="omnivad.wasm";if(!isDataURI(f)){return locateFile(f)}return f}var wasmBinaryFile;function getBinarySync(file){if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}throw"both async and sync fetching of the wasm failed"}async function getWasmBinary(binaryFile){if(!wasmBinary){try{var response=await readAsync(binaryFile);return new Uint8Array(response)}catch{}}return getBinarySync(binaryFile)}async function instantiateArrayBuffer(binaryFile,imports){try{var binary=await getWasmBinary(binaryFile);var instance=await WebAssembly.instantiate(binary,imports);return instance}catch(reason){err(`failed to asynchronously prepare wasm: ${reason}`);abort(reason)}}async function instantiateAsync(binary,binaryFile,imports){if(!binary&&typeof WebAssembly.instantiateStreaming=="function"&&!isDataURI(binaryFile)&&!ENVIRONMENT_IS_NODE&&typeof fetch=="function"){try{var response=fetch(binaryFile,{credentials:"same-origin"});var instantiationResult=await WebAssembly.instantiateStreaming(response,imports);return instantiationResult}catch(reason){err(`wasm streaming compile failed: ${reason}`);err("falling back to ArrayBuffer instantiation")}}return instantiateArrayBuffer(binaryFile,imports)}function getWasmImports(){return{a:wasmImports}}async function createWasm(){function receiveInstance(instance,module){wasmExports=instance.exports;wasmMemory=wasmExports["j"];updateMemoryViews();wasmTable=wasmExports["P"];addOnInit(wasmExports["k"]);removeRunDependency("wasm-instantiate");return wasmExports}addRunDependency("wasm-instantiate");function receiveInstantiationResult(result){receiveInstance(result["instance"])}var info=getWasmImports();if(Module["instantiateWasm"]){try{return Module["instantiateWasm"](info,receiveInstance)}catch(e){err(`Module.instantiateWasm callback failed with error: ${e}`);readyPromiseReject(e)}}wasmBinaryFile??=findWasmBinary();try{var result=await instantiateAsync(wasmBinary,wasmBinaryFile,info);receiveInstantiationResult(result);return result}catch(e){readyPromiseReject(e);return}}class ExitStatus{name="ExitStatus";constructor(status){this.message=`Program terminated with exit(${status})`;this.status=status}}var callRuntimeCallbacks=callbacks=>{while(callbacks.length>0){callbacks.shift()(Module)}};function getValue(ptr,type="i8"){if(type.endsWith("*"))type="*";switch(type){case"i1":return HEAP8[ptr];case"i8":return HEAP8[ptr];case"i16":return HEAP16[ptr>>1];case"i32":return HEAP32[ptr>>2];case"i64":abort("to do getValue(i64) use WASM_BIGINT");case"float":return HEAPF32[ptr>>2];case"double":return HEAPF64[ptr>>3];case"*":return HEAPU32[ptr>>2];default:abort(`invalid type for getValue: ${type}`)}}var noExitRuntime=Module["noExitRuntime"]||true;function setValue(ptr,value,type="i8"){if(type.endsWith("*"))type="*";switch(type){case"i1":HEAP8[ptr]=value;break;case"i8":HEAP8[ptr]=value;break;case"i16":HEAP16[ptr>>1]=value;break;case"i32":HEAP32[ptr>>2]=value;break;case"i64":abort("to do setValue(i64) use WASM_BIGINT");case"float":HEAPF32[ptr>>2]=value;break;case"double":HEAPF64[ptr>>3]=value;break;case"*":HEAPU32[ptr>>2]=value;break;default:abort(`invalid type for setValue: ${type}`)}}var stackRestore=val=>__emscripten_stack_restore(val);var stackSave=()=>_emscripten_stack_get_current();var wasmTable;var getWasmTableEntry=funcPtr=>wasmTable.get(funcPtr);var ___call_sighandler=(fp,sig)=>getWasmTableEntry(fp)(sig);var __abort_js=()=>abort("");var runtimeKeepaliveCounter=0;var __emscripten_runtime_keepalive_clear=()=>{noExitRuntime=false;runtimeKeepaliveCounter=0};var timers={};var handleException=e=>{if(e instanceof ExitStatus||e=="unwind"){return EXITSTATUS}quit_(1,e)};var keepRuntimeAlive=()=>noExitRuntime||runtimeKeepaliveCounter>0;var _proc_exit=code=>{EXITSTATUS=code;if(!keepRuntimeAlive()){Module["onExit"]?.(code);ABORT=true}quit_(code,new ExitStatus(code))};var exitJS=(status,implicit)=>{EXITSTATUS=status;_proc_exit(status)};var _exit=exitJS;var maybeExit=()=>{if(!keepRuntimeAlive()){try{_exit(EXITSTATUS)}catch(e){handleException(e)}}};var callUserCallback=func=>{if(ABORT){return}try{func();maybeExit()}catch(e){handleException(e)}};var _emscripten_get_now=()=>performance.now();var __setitimer_js=(which,timeout_ms)=>{if(timers[which]){clearTimeout(timers[which].id);delete timers[which]}if(!timeout_ms)return 0;var id=setTimeout(()=>{delete timers[which];callUserCallback(()=>__emscripten_timeout(which,_emscripten_get_now()))},timeout_ms);timers[which]={id,timeout_ms};return 0};var getHeapMax=()=>2147483648;var alignMemory=(size,alignment)=>Math.ceil(size/alignment)*alignment;var growMemory=size=>{var b=wasmMemory.buffer;var pages=(size-b.byteLength+65535)/65536|0;try{wasmMemory.grow(pages);updateMemoryViews();return 1}catch(e){}};var _emscripten_resize_heap=requestedSize=>{var oldSize=HEAPU8.length;requestedSize>>>=0;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignMemory(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=growMemory(newSize);if(replacement){return true}}return false};var _fd_close=fd=>52;var convertI32PairToI53Checked=(lo,hi)=>hi+2097152>>>0<4194305-!!lo?(lo>>>0)+hi*4294967296:NaN;function _fd_seek(fd,offset_low,offset_high,whence,newOffset){var offset=convertI32PairToI53Checked(offset_low,offset_high);return 70}var printCharBuffers=[null,[],[]];var UTF8Decoder=typeof TextDecoder!="undefined"?new TextDecoder:undefined;var UTF8ArrayToString=(heapOrArray,idx=0,maxBytesToRead=NaN)=>{var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heapOrArray[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.subarray(idx,endPtr))}var str="";while(idx<endPtr){var u0=heapOrArray[idx++];if(!(u0&128)){str+=String.fromCharCode(u0);continue}var u1=heapOrArray[idx++]&63;if((u0&224)==192){str+=String.fromCharCode((u0&31)<<6|u1);continue}var u2=heapOrArray[idx++]&63;if((u0&240)==224){u0=(u0&15)<<12|u1<<6|u2}else{u0=(u0&7)<<18|u1<<12|u2<<6|heapOrArray[idx++]&63}if(u0<65536){str+=String.fromCharCode(u0)}else{var ch=u0-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}}return str};var printChar=(stream,curr)=>{var buffer=printCharBuffers[stream];if(curr===0||curr===10){(stream===1?out:err)(UTF8ArrayToString(buffer));buffer.length=0}else{buffer.push(curr)}};var UTF8ToString=(ptr,maxBytesToRead)=>ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):"";var _fd_write=(fd,iov,iovcnt,pnum)=>{var num=0;for(var i=0;i<iovcnt;i++){var ptr=HEAPU32[iov>>2];var len=HEAPU32[iov+4>>2];iov+=8;for(var j=0;j<len;j++){printChar(fd,HEAPU8[ptr+j])}num+=len}HEAPU32[pnum>>2]=num;return 0};var getCFunc=ident=>{var func=Module["_"+ident];return func};var writeArrayToMemory=(array,buffer)=>{HEAP8.set(array,buffer)};var lengthBytesUTF8=str=>{var len=0;for(var i=0;i<str.length;++i){var c=str.charCodeAt(i);if(c<=127){len++}else if(c<=2047){len+=2}else if(c>=55296&&c<=57343){len+=4;++i}else{len+=3}}return len};var stringToUTF8Array=(str,heap,outIdx,maxBytesToWrite)=>{if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i<str.length;++i){var u=str.charCodeAt(i);if(u>=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx};var stringToUTF8=(str,outPtr,maxBytesToWrite)=>stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite);var stackAlloc=sz=>__emscripten_stack_alloc(sz);var stringToUTF8OnStack=str=>{var size=lengthBytesUTF8(str)+1;var ret=stackAlloc(size);stringToUTF8(str,ret,size);return ret};var ccall=(ident,returnType,argTypes,args,opts)=>{var toC={string:str=>{var ret=0;if(str!==null&&str!==undefined&&str!==0){ret=stringToUTF8OnStack(str)}return ret},array:arr=>{var ret=stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret}};function convertReturnValue(ret){if(returnType==="string"){return UTF8ToString(ret)}if(returnType==="boolean")return Boolean(ret);return ret}var func=getCFunc(ident);var cArgs=[];var stack=0;if(args){for(var i=0;i<args.length;i++){var converter=toC[argTypes[i]];if(converter){if(stack===0)stack=stackSave();cArgs[i]=converter(args[i])}else{cArgs[i]=args[i]}}}var ret=func(...cArgs);function onDone(ret){if(stack!==0)stackRestore(stack);return convertReturnValue(ret)}ret=onDone(ret);return ret};var cwrap=(ident,returnType,argTypes,opts)=>{var numericArgs=!argTypes||argTypes.every(type=>type==="number"||type==="boolean");var numericRet=returnType!=="string";if(numericRet&&numericArgs&&!opts){return getCFunc(ident)}return(...args)=>ccall(ident,returnType,argTypes,args,opts)};var wasmImports={c:___call_sighandler,i:__abort_js,e:__emscripten_runtime_keepalive_clear,f:__setitimer_js,g:_emscripten_resize_heap,h:_fd_close,b:_fd_seek,a:_fd_write,d:_proc_exit};var wasmExports;createWasm();var ___wasm_call_ctors=()=>(___wasm_call_ctors=wasmExports["k"])();var _omni_post_config_default=Module["_omni_post_config_default"]=a0=>(_omni_post_config_default=Module["_omni_post_config_default"]=wasmExports["l"])(a0);var _omni_aed_post_config_default=Module["_omni_aed_post_config_default"]=a0=>(_omni_aed_post_config_default=Module["_omni_aed_post_config_default"]=wasmExports["m"])(a0);var _omni_error_string=Module["_omni_error_string"]=a0=>(_omni_error_string=Module["_omni_error_string"]=wasmExports["n"])(a0);var _omni_free=Module["_omni_free"]=a0=>(_omni_free=Module["_omni_free"]=wasmExports["o"])(a0);var _free=Module["_free"]=a0=>(_free=Module["_free"]=wasmExports["p"])(a0);var _omni_stream_vad_config_default=Module["_omni_stream_vad_config_default"]=a0=>(_omni_stream_vad_config_default=Module["_omni_stream_vad_config_default"]=wasmExports["q"])(a0);var _omni_stream_vad_create_from_buffer=Module["_omni_stream_vad_create_from_buffer"]=(a0,a1,a2,a3)=>(_omni_stream_vad_create_from_buffer=Module["_omni_stream_vad_create_from_buffer"]=wasmExports["r"])(a0,a1,a2,a3);var _omni_stream_vad_clone=Module["_omni_stream_vad_clone"]=(a0,a1)=>(_omni_stream_vad_clone=Module["_omni_stream_vad_clone"]=wasmExports["s"])(a0,a1);var _omni_stream_vad_process=Module["_omni_stream_vad_process"]=(a0,a1,a2,a3)=>(_omni_stream_vad_process=Module["_omni_stream_vad_process"]=wasmExports["t"])(a0,a1,a2,a3);var _omni_stream_vad_process_int16=Module["_omni_stream_vad_process_int16"]=(a0,a1,a2,a3)=>(_omni_stream_vad_process_int16=Module["_omni_stream_vad_process_int16"]=wasmExports["u"])(a0,a1,a2,a3);var _omni_stream_vad_detect_full=Module["_omni_stream_vad_detect_full"]=(a0,a1,a2,a3,a4)=>(_omni_stream_vad_detect_full=Module["_omni_stream_vad_detect_full"]=wasmExports["v"])(a0,a1,a2,a3,a4);var _omni_stream_vad_detect_full_int16=Module["_omni_stream_vad_detect_full_int16"]=(a0,a1,a2,a3,a4)=>(_omni_stream_vad_detect_full_int16=Module["_omni_stream_vad_detect_full_int16"]=wasmExports["w"])(a0,a1,a2,a3,a4);var _omni_stream_vad_reset=Module["_omni_stream_vad_reset"]=a0=>(_omni_stream_vad_reset=Module["_omni_stream_vad_reset"]=wasmExports["x"])(a0);var _omni_stream_vad_get_frame_offset=Module["_omni_stream_vad_get_frame_offset"]=a0=>(_omni_stream_vad_get_frame_offset=Module["_omni_stream_vad_get_frame_offset"]=wasmExports["y"])(a0);var _omni_stream_vad_destroy=Module["_omni_stream_vad_destroy"]=a0=>(_omni_stream_vad_destroy=Module["_omni_stream_vad_destroy"]=wasmExports["z"])(a0);var _omni_vad_create_from_buffer=Module["_omni_vad_create_from_buffer"]=(a0,a1,a2)=>(_omni_vad_create_from_buffer=Module["_omni_vad_create_from_buffer"]=wasmExports["A"])(a0,a1,a2);var _omni_vad_destroy=Module["_omni_vad_destroy"]=a0=>(_omni_vad_destroy=Module["_omni_vad_destroy"]=wasmExports["B"])(a0);var _omni_vad_detect=Module["_omni_vad_detect"]=(a0,a1,a2,a3,a4,a5)=>(_omni_vad_detect=Module["_omni_vad_detect"]=wasmExports["C"])(a0,a1,a2,a3,a4,a5);var _omni_vad_detect_int16=Module["_omni_vad_detect_int16"]=(a0,a1,a2,a3,a4,a5)=>(_omni_vad_detect_int16=Module["_omni_vad_detect_int16"]=wasmExports["D"])(a0,a1,a2,a3,a4,a5);var _omni_vad_detect_probs=Module["_omni_vad_detect_probs"]=(a0,a1,a2,a3,a4)=>(_omni_vad_detect_probs=Module["_omni_vad_detect_probs"]=wasmExports["E"])(a0,a1,a2,a3,a4);var _omni_vad_detect_probs_int16=Module["_omni_vad_detect_probs_int16"]=(a0,a1,a2,a3,a4)=>(_omni_vad_detect_probs_int16=Module["_omni_vad_detect_probs_int16"]=wasmExports["F"])(a0,a1,a2,a3,a4);var _omni_aed_create_from_buffer=Module["_omni_aed_create_from_buffer"]=(a0,a1,a2)=>(_omni_aed_create_from_buffer=Module["_omni_aed_create_from_buffer"]=wasmExports["G"])(a0,a1,a2);var _omni_aed_destroy=Module["_omni_aed_destroy"]=a0=>(_omni_aed_destroy=Module["_omni_aed_destroy"]=wasmExports["H"])(a0);var _omni_aed_detect=Module["_omni_aed_detect"]=(a0,a1,a2,a3,a4,a5)=>(_omni_aed_detect=Module["_omni_aed_detect"]=wasmExports["I"])(a0,a1,a2,a3,a4,a5);var _omni_aed_detect_int16=Module["_omni_aed_detect_int16"]=(a0,a1,a2,a3,a4,a5)=>(_omni_aed_detect_int16=Module["_omni_aed_detect_int16"]=wasmExports["J"])(a0,a1,a2,a3,a4,a5);var _omni_aed_detect_probs=Module["_omni_aed_detect_probs"]=(a0,a1,a2,a3,a4)=>(_omni_aed_detect_probs=Module["_omni_aed_detect_probs"]=wasmExports["K"])(a0,a1,a2,a3,a4);var _omni_aed_detect_probs_int16=Module["_omni_aed_detect_probs_int16"]=(a0,a1,a2,a3,a4)=>(_omni_aed_detect_probs_int16=Module["_omni_aed_detect_probs_int16"]=wasmExports["L"])(a0,a1,a2,a3,a4);var _malloc=Module["_malloc"]=a0=>(_malloc=Module["_malloc"]=wasmExports["M"])(a0);var _omni_chunk_config_default=Module["_omni_chunk_config_default"]=a0=>(_omni_chunk_config_default=Module["_omni_chunk_config_default"]=wasmExports["N"])(a0);var _omni_merge_chunks=Module["_omni_merge_chunks"]=(a0,a1,a2,a3,a4)=>(_omni_merge_chunks=Module["_omni_merge_chunks"]=wasmExports["O"])(a0,a1,a2,a3,a4);var __emscripten_timeout=(a0,a1)=>(__emscripten_timeout=wasmExports["Q"])(a0,a1);var __emscripten_stack_restore=a0=>(__emscripten_stack_restore=wasmExports["R"])(a0);var __emscripten_stack_alloc=a0=>(__emscripten_stack_alloc=wasmExports["S"])(a0);var _emscripten_stack_get_current=()=>(_emscripten_stack_get_current=wasmExports["T"])();Module["ccall"]=ccall;Module["cwrap"]=cwrap;Module["setValue"]=setValue;Module["getValue"]=getValue;var calledRun;dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function run(){if(runDependencies>0){return}preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();readyPromiseResolve(Module);Module["onRuntimeInitialized"]?.();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(()=>{setTimeout(()=>Module["setStatus"](""),1);doRun()},1)}else{doRun()}}if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}run();moduleRtn=readyPromise;
10
10
 
11
11
 
12
12
  return moduleRtn;
@@ -6,7 +6,7 @@ var createOmniVAD = (() => {
6
6
  function(moduleArg = {}) {
7
7
  var moduleRtn;
8
8
 
9
- var Module=moduleArg;var readyPromiseResolve,readyPromiseReject;var readyPromise=new Promise((resolve,reject)=>{readyPromiseResolve=resolve;readyPromiseReject=reject});var ENVIRONMENT_IS_WEB=typeof window=="object";var ENVIRONMENT_IS_WORKER=typeof WorkerGlobalScope!="undefined";var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string"&&process.type!="renderer";if(ENVIRONMENT_IS_NODE){}var moduleOverrides=Object.assign({},Module);var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var readAsync,readBinary;if(ENVIRONMENT_IS_NODE){var fs=require("fs");var nodePath=require("path");scriptDirectory=__dirname+"/";readBinary=filename=>{filename=isFileURI(filename)?new URL(filename):filename;var ret=fs.readFileSync(filename);return ret};readAsync=async(filename,binary=true)=>{filename=isFileURI(filename)?new URL(filename):filename;var ret=fs.readFileSync(filename,binary?undefined:"utf8");return ret};if(!Module["thisProgram"]&&process.argv.length>1){thisProgram=process.argv[1].replace(/\\/g,"/")}arguments_=process.argv.slice(2);quit_=(status,toThrow)=>{process.exitCode=status;throw toThrow}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!="undefined"&&document.currentScript){scriptDirectory=document.currentScript.src}if(_scriptName){scriptDirectory=_scriptName}if(scriptDirectory.startsWith("blob:")){scriptDirectory=""}else{scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1)}{readAsync=async url=>{var response=await fetch(url,{credentials:"same-origin"});if(response.ok){return response.arrayBuffer()}throw new Error(response.status+" : "+response.url)}}}else{}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.error.bind(console);Object.assign(Module,moduleOverrides);moduleOverrides=null;if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];var wasmBinary=Module["wasmBinary"];var wasmMemory;var ABORT=false;var EXITSTATUS;var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateMemoryViews(){var b=wasmMemory.buffer;Module["HEAP8"]=HEAP8=new Int8Array(b);Module["HEAP16"]=HEAP16=new Int16Array(b);Module["HEAPU8"]=HEAPU8=new Uint8Array(b);Module["HEAPU16"]=HEAPU16=new Uint16Array(b);Module["HEAP32"]=HEAP32=new Int32Array(b);Module["HEAPU32"]=HEAPU32=new Uint32Array(b);Module["HEAPF32"]=HEAPF32=new Float32Array(b);Module["HEAPF64"]=HEAPF64=new Float64Array(b)}var __ATPRERUN__=[];var __ATINIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=true;callRuntimeCallbacks(__ATINIT__)}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnInit(cb){__ATINIT__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}var runDependencies=0;var dependenciesFulfilled=null;function addRunDependency(id){runDependencies++;Module["monitorRunDependencies"]?.(runDependencies)}function removeRunDependency(id){runDependencies--;Module["monitorRunDependencies"]?.(runDependencies);if(runDependencies==0){if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}function abort(what){Module["onAbort"]?.(what);what="Aborted("+what+")";err(what);ABORT=true;what+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(what);readyPromiseReject(e);throw e}var dataURIPrefix="data:application/octet-stream;base64,";var isDataURI=filename=>filename.startsWith(dataURIPrefix);var isFileURI=filename=>filename.startsWith("file://");function findWasmBinary(){var f="omnivad.wasm";if(!isDataURI(f)){return locateFile(f)}return f}var wasmBinaryFile;function getBinarySync(file){if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}throw"both async and sync fetching of the wasm failed"}async function getWasmBinary(binaryFile){if(!wasmBinary){try{var response=await readAsync(binaryFile);return new Uint8Array(response)}catch{}}return getBinarySync(binaryFile)}async function instantiateArrayBuffer(binaryFile,imports){try{var binary=await getWasmBinary(binaryFile);var instance=await WebAssembly.instantiate(binary,imports);return instance}catch(reason){err(`failed to asynchronously prepare wasm: ${reason}`);abort(reason)}}async function instantiateAsync(binary,binaryFile,imports){if(!binary&&typeof WebAssembly.instantiateStreaming=="function"&&!isDataURI(binaryFile)&&!ENVIRONMENT_IS_NODE&&typeof fetch=="function"){try{var response=fetch(binaryFile,{credentials:"same-origin"});var instantiationResult=await WebAssembly.instantiateStreaming(response,imports);return instantiationResult}catch(reason){err(`wasm streaming compile failed: ${reason}`);err("falling back to ArrayBuffer instantiation")}}return instantiateArrayBuffer(binaryFile,imports)}function getWasmImports(){return{a:wasmImports}}async function createWasm(){function receiveInstance(instance,module){wasmExports=instance.exports;wasmMemory=wasmExports["j"];updateMemoryViews();wasmTable=wasmExports["O"];addOnInit(wasmExports["k"]);removeRunDependency("wasm-instantiate");return wasmExports}addRunDependency("wasm-instantiate");function receiveInstantiationResult(result){receiveInstance(result["instance"])}var info=getWasmImports();if(Module["instantiateWasm"]){try{return Module["instantiateWasm"](info,receiveInstance)}catch(e){err(`Module.instantiateWasm callback failed with error: ${e}`);readyPromiseReject(e)}}wasmBinaryFile??=findWasmBinary();try{var result=await instantiateAsync(wasmBinary,wasmBinaryFile,info);receiveInstantiationResult(result);return result}catch(e){readyPromiseReject(e);return}}class ExitStatus{name="ExitStatus";constructor(status){this.message=`Program terminated with exit(${status})`;this.status=status}}var callRuntimeCallbacks=callbacks=>{while(callbacks.length>0){callbacks.shift()(Module)}};function getValue(ptr,type="i8"){if(type.endsWith("*"))type="*";switch(type){case"i1":return HEAP8[ptr];case"i8":return HEAP8[ptr];case"i16":return HEAP16[ptr>>1];case"i32":return HEAP32[ptr>>2];case"i64":abort("to do getValue(i64) use WASM_BIGINT");case"float":return HEAPF32[ptr>>2];case"double":return HEAPF64[ptr>>3];case"*":return HEAPU32[ptr>>2];default:abort(`invalid type for getValue: ${type}`)}}var noExitRuntime=Module["noExitRuntime"]||true;function setValue(ptr,value,type="i8"){if(type.endsWith("*"))type="*";switch(type){case"i1":HEAP8[ptr]=value;break;case"i8":HEAP8[ptr]=value;break;case"i16":HEAP16[ptr>>1]=value;break;case"i32":HEAP32[ptr>>2]=value;break;case"i64":abort("to do setValue(i64) use WASM_BIGINT");case"float":HEAPF32[ptr>>2]=value;break;case"double":HEAPF64[ptr>>3]=value;break;case"*":HEAPU32[ptr>>2]=value;break;default:abort(`invalid type for setValue: ${type}`)}}var stackRestore=val=>__emscripten_stack_restore(val);var stackSave=()=>_emscripten_stack_get_current();var wasmTable;var getWasmTableEntry=funcPtr=>wasmTable.get(funcPtr);var ___call_sighandler=(fp,sig)=>getWasmTableEntry(fp)(sig);var __abort_js=()=>abort("");var runtimeKeepaliveCounter=0;var __emscripten_runtime_keepalive_clear=()=>{noExitRuntime=false;runtimeKeepaliveCounter=0};var timers={};var handleException=e=>{if(e instanceof ExitStatus||e=="unwind"){return EXITSTATUS}quit_(1,e)};var keepRuntimeAlive=()=>noExitRuntime||runtimeKeepaliveCounter>0;var _proc_exit=code=>{EXITSTATUS=code;if(!keepRuntimeAlive()){Module["onExit"]?.(code);ABORT=true}quit_(code,new ExitStatus(code))};var exitJS=(status,implicit)=>{EXITSTATUS=status;_proc_exit(status)};var _exit=exitJS;var maybeExit=()=>{if(!keepRuntimeAlive()){try{_exit(EXITSTATUS)}catch(e){handleException(e)}}};var callUserCallback=func=>{if(ABORT){return}try{func();maybeExit()}catch(e){handleException(e)}};var _emscripten_get_now=()=>performance.now();var __setitimer_js=(which,timeout_ms)=>{if(timers[which]){clearTimeout(timers[which].id);delete timers[which]}if(!timeout_ms)return 0;var id=setTimeout(()=>{delete timers[which];callUserCallback(()=>__emscripten_timeout(which,_emscripten_get_now()))},timeout_ms);timers[which]={id,timeout_ms};return 0};var getHeapMax=()=>2147483648;var alignMemory=(size,alignment)=>Math.ceil(size/alignment)*alignment;var growMemory=size=>{var b=wasmMemory.buffer;var pages=(size-b.byteLength+65535)/65536|0;try{wasmMemory.grow(pages);updateMemoryViews();return 1}catch(e){}};var _emscripten_resize_heap=requestedSize=>{var oldSize=HEAPU8.length;requestedSize>>>=0;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignMemory(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=growMemory(newSize);if(replacement){return true}}return false};var _fd_close=fd=>52;var convertI32PairToI53Checked=(lo,hi)=>hi+2097152>>>0<4194305-!!lo?(lo>>>0)+hi*4294967296:NaN;function _fd_seek(fd,offset_low,offset_high,whence,newOffset){var offset=convertI32PairToI53Checked(offset_low,offset_high);return 70}var printCharBuffers=[null,[],[]];var UTF8Decoder=typeof TextDecoder!="undefined"?new TextDecoder:undefined;var UTF8ArrayToString=(heapOrArray,idx=0,maxBytesToRead=NaN)=>{var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heapOrArray[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.subarray(idx,endPtr))}var str="";while(idx<endPtr){var u0=heapOrArray[idx++];if(!(u0&128)){str+=String.fromCharCode(u0);continue}var u1=heapOrArray[idx++]&63;if((u0&224)==192){str+=String.fromCharCode((u0&31)<<6|u1);continue}var u2=heapOrArray[idx++]&63;if((u0&240)==224){u0=(u0&15)<<12|u1<<6|u2}else{u0=(u0&7)<<18|u1<<12|u2<<6|heapOrArray[idx++]&63}if(u0<65536){str+=String.fromCharCode(u0)}else{var ch=u0-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}}return str};var printChar=(stream,curr)=>{var buffer=printCharBuffers[stream];if(curr===0||curr===10){(stream===1?out:err)(UTF8ArrayToString(buffer));buffer.length=0}else{buffer.push(curr)}};var UTF8ToString=(ptr,maxBytesToRead)=>ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):"";var _fd_write=(fd,iov,iovcnt,pnum)=>{var num=0;for(var i=0;i<iovcnt;i++){var ptr=HEAPU32[iov>>2];var len=HEAPU32[iov+4>>2];iov+=8;for(var j=0;j<len;j++){printChar(fd,HEAPU8[ptr+j])}num+=len}HEAPU32[pnum>>2]=num;return 0};var getCFunc=ident=>{var func=Module["_"+ident];return func};var writeArrayToMemory=(array,buffer)=>{HEAP8.set(array,buffer)};var lengthBytesUTF8=str=>{var len=0;for(var i=0;i<str.length;++i){var c=str.charCodeAt(i);if(c<=127){len++}else if(c<=2047){len+=2}else if(c>=55296&&c<=57343){len+=4;++i}else{len+=3}}return len};var stringToUTF8Array=(str,heap,outIdx,maxBytesToWrite)=>{if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i<str.length;++i){var u=str.charCodeAt(i);if(u>=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx};var stringToUTF8=(str,outPtr,maxBytesToWrite)=>stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite);var stackAlloc=sz=>__emscripten_stack_alloc(sz);var stringToUTF8OnStack=str=>{var size=lengthBytesUTF8(str)+1;var ret=stackAlloc(size);stringToUTF8(str,ret,size);return ret};var ccall=(ident,returnType,argTypes,args,opts)=>{var toC={string:str=>{var ret=0;if(str!==null&&str!==undefined&&str!==0){ret=stringToUTF8OnStack(str)}return ret},array:arr=>{var ret=stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret}};function convertReturnValue(ret){if(returnType==="string"){return UTF8ToString(ret)}if(returnType==="boolean")return Boolean(ret);return ret}var func=getCFunc(ident);var cArgs=[];var stack=0;if(args){for(var i=0;i<args.length;i++){var converter=toC[argTypes[i]];if(converter){if(stack===0)stack=stackSave();cArgs[i]=converter(args[i])}else{cArgs[i]=args[i]}}}var ret=func(...cArgs);function onDone(ret){if(stack!==0)stackRestore(stack);return convertReturnValue(ret)}ret=onDone(ret);return ret};var cwrap=(ident,returnType,argTypes,opts)=>{var numericArgs=!argTypes||argTypes.every(type=>type==="number"||type==="boolean");var numericRet=returnType!=="string";if(numericRet&&numericArgs&&!opts){return getCFunc(ident)}return(...args)=>ccall(ident,returnType,argTypes,args,opts)};var wasmImports={c:___call_sighandler,i:__abort_js,e:__emscripten_runtime_keepalive_clear,f:__setitimer_js,g:_emscripten_resize_heap,h:_fd_close,b:_fd_seek,a:_fd_write,d:_proc_exit};var wasmExports;createWasm();var ___wasm_call_ctors=()=>(___wasm_call_ctors=wasmExports["k"])();var _omni_post_config_default=Module["_omni_post_config_default"]=a0=>(_omni_post_config_default=Module["_omni_post_config_default"]=wasmExports["l"])(a0);var _omni_aed_post_config_default=Module["_omni_aed_post_config_default"]=a0=>(_omni_aed_post_config_default=Module["_omni_aed_post_config_default"]=wasmExports["m"])(a0);var _omni_error_string=Module["_omni_error_string"]=a0=>(_omni_error_string=Module["_omni_error_string"]=wasmExports["n"])(a0);var _omni_free=Module["_omni_free"]=a0=>(_omni_free=Module["_omni_free"]=wasmExports["o"])(a0);var _free=Module["_free"]=a0=>(_free=Module["_free"]=wasmExports["p"])(a0);var _omni_stream_vad_config_default=Module["_omni_stream_vad_config_default"]=a0=>(_omni_stream_vad_config_default=Module["_omni_stream_vad_config_default"]=wasmExports["q"])(a0);var _omni_stream_vad_create_from_buffer=Module["_omni_stream_vad_create_from_buffer"]=(a0,a1,a2,a3)=>(_omni_stream_vad_create_from_buffer=Module["_omni_stream_vad_create_from_buffer"]=wasmExports["r"])(a0,a1,a2,a3);var _omni_stream_vad_clone=Module["_omni_stream_vad_clone"]=(a0,a1)=>(_omni_stream_vad_clone=Module["_omni_stream_vad_clone"]=wasmExports["s"])(a0,a1);var _omni_stream_vad_process=Module["_omni_stream_vad_process"]=(a0,a1,a2,a3)=>(_omni_stream_vad_process=Module["_omni_stream_vad_process"]=wasmExports["t"])(a0,a1,a2,a3);var _omni_stream_vad_detect_full=Module["_omni_stream_vad_detect_full"]=(a0,a1,a2,a3,a4)=>(_omni_stream_vad_detect_full=Module["_omni_stream_vad_detect_full"]=wasmExports["u"])(a0,a1,a2,a3,a4);var _omni_stream_vad_detect_full_int16=Module["_omni_stream_vad_detect_full_int16"]=(a0,a1,a2,a3,a4)=>(_omni_stream_vad_detect_full_int16=Module["_omni_stream_vad_detect_full_int16"]=wasmExports["v"])(a0,a1,a2,a3,a4);var _omni_stream_vad_reset=Module["_omni_stream_vad_reset"]=a0=>(_omni_stream_vad_reset=Module["_omni_stream_vad_reset"]=wasmExports["w"])(a0);var _omni_stream_vad_get_frame_offset=Module["_omni_stream_vad_get_frame_offset"]=a0=>(_omni_stream_vad_get_frame_offset=Module["_omni_stream_vad_get_frame_offset"]=wasmExports["x"])(a0);var _omni_stream_vad_destroy=Module["_omni_stream_vad_destroy"]=a0=>(_omni_stream_vad_destroy=Module["_omni_stream_vad_destroy"]=wasmExports["y"])(a0);var _omni_vad_create_from_buffer=Module["_omni_vad_create_from_buffer"]=(a0,a1,a2)=>(_omni_vad_create_from_buffer=Module["_omni_vad_create_from_buffer"]=wasmExports["z"])(a0,a1,a2);var _omni_vad_destroy=Module["_omni_vad_destroy"]=a0=>(_omni_vad_destroy=Module["_omni_vad_destroy"]=wasmExports["A"])(a0);var _omni_vad_detect=Module["_omni_vad_detect"]=(a0,a1,a2,a3,a4,a5)=>(_omni_vad_detect=Module["_omni_vad_detect"]=wasmExports["B"])(a0,a1,a2,a3,a4,a5);var _omni_vad_detect_int16=Module["_omni_vad_detect_int16"]=(a0,a1,a2,a3,a4,a5)=>(_omni_vad_detect_int16=Module["_omni_vad_detect_int16"]=wasmExports["C"])(a0,a1,a2,a3,a4,a5);var _omni_vad_detect_probs=Module["_omni_vad_detect_probs"]=(a0,a1,a2,a3,a4)=>(_omni_vad_detect_probs=Module["_omni_vad_detect_probs"]=wasmExports["D"])(a0,a1,a2,a3,a4);var _omni_vad_detect_probs_int16=Module["_omni_vad_detect_probs_int16"]=(a0,a1,a2,a3,a4)=>(_omni_vad_detect_probs_int16=Module["_omni_vad_detect_probs_int16"]=wasmExports["E"])(a0,a1,a2,a3,a4);var _omni_aed_create_from_buffer=Module["_omni_aed_create_from_buffer"]=(a0,a1,a2)=>(_omni_aed_create_from_buffer=Module["_omni_aed_create_from_buffer"]=wasmExports["F"])(a0,a1,a2);var _omni_aed_destroy=Module["_omni_aed_destroy"]=a0=>(_omni_aed_destroy=Module["_omni_aed_destroy"]=wasmExports["G"])(a0);var _omni_aed_detect=Module["_omni_aed_detect"]=(a0,a1,a2,a3,a4,a5)=>(_omni_aed_detect=Module["_omni_aed_detect"]=wasmExports["H"])(a0,a1,a2,a3,a4,a5);var _omni_aed_detect_int16=Module["_omni_aed_detect_int16"]=(a0,a1,a2,a3,a4,a5)=>(_omni_aed_detect_int16=Module["_omni_aed_detect_int16"]=wasmExports["I"])(a0,a1,a2,a3,a4,a5);var _omni_aed_detect_probs=Module["_omni_aed_detect_probs"]=(a0,a1,a2,a3,a4)=>(_omni_aed_detect_probs=Module["_omni_aed_detect_probs"]=wasmExports["J"])(a0,a1,a2,a3,a4);var _omni_aed_detect_probs_int16=Module["_omni_aed_detect_probs_int16"]=(a0,a1,a2,a3,a4)=>(_omni_aed_detect_probs_int16=Module["_omni_aed_detect_probs_int16"]=wasmExports["K"])(a0,a1,a2,a3,a4);var _malloc=Module["_malloc"]=a0=>(_malloc=Module["_malloc"]=wasmExports["L"])(a0);var _omni_chunk_config_default=Module["_omni_chunk_config_default"]=a0=>(_omni_chunk_config_default=Module["_omni_chunk_config_default"]=wasmExports["M"])(a0);var _omni_merge_chunks=Module["_omni_merge_chunks"]=(a0,a1,a2,a3,a4)=>(_omni_merge_chunks=Module["_omni_merge_chunks"]=wasmExports["N"])(a0,a1,a2,a3,a4);var __emscripten_timeout=(a0,a1)=>(__emscripten_timeout=wasmExports["P"])(a0,a1);var __emscripten_stack_restore=a0=>(__emscripten_stack_restore=wasmExports["Q"])(a0);var __emscripten_stack_alloc=a0=>(__emscripten_stack_alloc=wasmExports["R"])(a0);var _emscripten_stack_get_current=()=>(_emscripten_stack_get_current=wasmExports["S"])();Module["ccall"]=ccall;Module["cwrap"]=cwrap;Module["setValue"]=setValue;Module["getValue"]=getValue;var calledRun;dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function run(){if(runDependencies>0){return}preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();readyPromiseResolve(Module);Module["onRuntimeInitialized"]?.();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(()=>{setTimeout(()=>Module["setStatus"](""),1);doRun()},1)}else{doRun()}}if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}run();moduleRtn=readyPromise;
9
+ var Module=moduleArg;var readyPromiseResolve,readyPromiseReject;var readyPromise=new Promise((resolve,reject)=>{readyPromiseResolve=resolve;readyPromiseReject=reject});var ENVIRONMENT_IS_WEB=typeof window=="object";var ENVIRONMENT_IS_WORKER=typeof WorkerGlobalScope!="undefined";var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string"&&process.type!="renderer";if(ENVIRONMENT_IS_NODE){}var moduleOverrides=Object.assign({},Module);var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var readAsync,readBinary;if(ENVIRONMENT_IS_NODE){var fs=require("fs");var nodePath=require("path");scriptDirectory=__dirname+"/";readBinary=filename=>{filename=isFileURI(filename)?new URL(filename):filename;var ret=fs.readFileSync(filename);return ret};readAsync=async(filename,binary=true)=>{filename=isFileURI(filename)?new URL(filename):filename;var ret=fs.readFileSync(filename,binary?undefined:"utf8");return ret};if(!Module["thisProgram"]&&process.argv.length>1){thisProgram=process.argv[1].replace(/\\/g,"/")}arguments_=process.argv.slice(2);quit_=(status,toThrow)=>{process.exitCode=status;throw toThrow}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!="undefined"&&document.currentScript){scriptDirectory=document.currentScript.src}if(_scriptName){scriptDirectory=_scriptName}if(scriptDirectory.startsWith("blob:")){scriptDirectory=""}else{scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1)}{readAsync=async url=>{var response=await fetch(url,{credentials:"same-origin"});if(response.ok){return response.arrayBuffer()}throw new Error(response.status+" : "+response.url)}}}else{}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.error.bind(console);Object.assign(Module,moduleOverrides);moduleOverrides=null;if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];var wasmBinary=Module["wasmBinary"];var wasmMemory;var ABORT=false;var EXITSTATUS;var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateMemoryViews(){var b=wasmMemory.buffer;Module["HEAP8"]=HEAP8=new Int8Array(b);Module["HEAP16"]=HEAP16=new Int16Array(b);Module["HEAPU8"]=HEAPU8=new Uint8Array(b);Module["HEAPU16"]=HEAPU16=new Uint16Array(b);Module["HEAP32"]=HEAP32=new Int32Array(b);Module["HEAPU32"]=HEAPU32=new Uint32Array(b);Module["HEAPF32"]=HEAPF32=new Float32Array(b);Module["HEAPF64"]=HEAPF64=new Float64Array(b)}var __ATPRERUN__=[];var __ATINIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=true;callRuntimeCallbacks(__ATINIT__)}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnInit(cb){__ATINIT__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}var runDependencies=0;var dependenciesFulfilled=null;function addRunDependency(id){runDependencies++;Module["monitorRunDependencies"]?.(runDependencies)}function removeRunDependency(id){runDependencies--;Module["monitorRunDependencies"]?.(runDependencies);if(runDependencies==0){if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}function abort(what){Module["onAbort"]?.(what);what="Aborted("+what+")";err(what);ABORT=true;what+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(what);readyPromiseReject(e);throw e}var dataURIPrefix="data:application/octet-stream;base64,";var isDataURI=filename=>filename.startsWith(dataURIPrefix);var isFileURI=filename=>filename.startsWith("file://");function findWasmBinary(){var f="omnivad.wasm";if(!isDataURI(f)){return locateFile(f)}return f}var wasmBinaryFile;function getBinarySync(file){if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}throw"both async and sync fetching of the wasm failed"}async function getWasmBinary(binaryFile){if(!wasmBinary){try{var response=await readAsync(binaryFile);return new Uint8Array(response)}catch{}}return getBinarySync(binaryFile)}async function instantiateArrayBuffer(binaryFile,imports){try{var binary=await getWasmBinary(binaryFile);var instance=await WebAssembly.instantiate(binary,imports);return instance}catch(reason){err(`failed to asynchronously prepare wasm: ${reason}`);abort(reason)}}async function instantiateAsync(binary,binaryFile,imports){if(!binary&&typeof WebAssembly.instantiateStreaming=="function"&&!isDataURI(binaryFile)&&!ENVIRONMENT_IS_NODE&&typeof fetch=="function"){try{var response=fetch(binaryFile,{credentials:"same-origin"});var instantiationResult=await WebAssembly.instantiateStreaming(response,imports);return instantiationResult}catch(reason){err(`wasm streaming compile failed: ${reason}`);err("falling back to ArrayBuffer instantiation")}}return instantiateArrayBuffer(binaryFile,imports)}function getWasmImports(){return{a:wasmImports}}async function createWasm(){function receiveInstance(instance,module){wasmExports=instance.exports;wasmMemory=wasmExports["j"];updateMemoryViews();wasmTable=wasmExports["P"];addOnInit(wasmExports["k"]);removeRunDependency("wasm-instantiate");return wasmExports}addRunDependency("wasm-instantiate");function receiveInstantiationResult(result){receiveInstance(result["instance"])}var info=getWasmImports();if(Module["instantiateWasm"]){try{return Module["instantiateWasm"](info,receiveInstance)}catch(e){err(`Module.instantiateWasm callback failed with error: ${e}`);readyPromiseReject(e)}}wasmBinaryFile??=findWasmBinary();try{var result=await instantiateAsync(wasmBinary,wasmBinaryFile,info);receiveInstantiationResult(result);return result}catch(e){readyPromiseReject(e);return}}class ExitStatus{name="ExitStatus";constructor(status){this.message=`Program terminated with exit(${status})`;this.status=status}}var callRuntimeCallbacks=callbacks=>{while(callbacks.length>0){callbacks.shift()(Module)}};function getValue(ptr,type="i8"){if(type.endsWith("*"))type="*";switch(type){case"i1":return HEAP8[ptr];case"i8":return HEAP8[ptr];case"i16":return HEAP16[ptr>>1];case"i32":return HEAP32[ptr>>2];case"i64":abort("to do getValue(i64) use WASM_BIGINT");case"float":return HEAPF32[ptr>>2];case"double":return HEAPF64[ptr>>3];case"*":return HEAPU32[ptr>>2];default:abort(`invalid type for getValue: ${type}`)}}var noExitRuntime=Module["noExitRuntime"]||true;function setValue(ptr,value,type="i8"){if(type.endsWith("*"))type="*";switch(type){case"i1":HEAP8[ptr]=value;break;case"i8":HEAP8[ptr]=value;break;case"i16":HEAP16[ptr>>1]=value;break;case"i32":HEAP32[ptr>>2]=value;break;case"i64":abort("to do setValue(i64) use WASM_BIGINT");case"float":HEAPF32[ptr>>2]=value;break;case"double":HEAPF64[ptr>>3]=value;break;case"*":HEAPU32[ptr>>2]=value;break;default:abort(`invalid type for setValue: ${type}`)}}var stackRestore=val=>__emscripten_stack_restore(val);var stackSave=()=>_emscripten_stack_get_current();var wasmTable;var getWasmTableEntry=funcPtr=>wasmTable.get(funcPtr);var ___call_sighandler=(fp,sig)=>getWasmTableEntry(fp)(sig);var __abort_js=()=>abort("");var runtimeKeepaliveCounter=0;var __emscripten_runtime_keepalive_clear=()=>{noExitRuntime=false;runtimeKeepaliveCounter=0};var timers={};var handleException=e=>{if(e instanceof ExitStatus||e=="unwind"){return EXITSTATUS}quit_(1,e)};var keepRuntimeAlive=()=>noExitRuntime||runtimeKeepaliveCounter>0;var _proc_exit=code=>{EXITSTATUS=code;if(!keepRuntimeAlive()){Module["onExit"]?.(code);ABORT=true}quit_(code,new ExitStatus(code))};var exitJS=(status,implicit)=>{EXITSTATUS=status;_proc_exit(status)};var _exit=exitJS;var maybeExit=()=>{if(!keepRuntimeAlive()){try{_exit(EXITSTATUS)}catch(e){handleException(e)}}};var callUserCallback=func=>{if(ABORT){return}try{func();maybeExit()}catch(e){handleException(e)}};var _emscripten_get_now=()=>performance.now();var __setitimer_js=(which,timeout_ms)=>{if(timers[which]){clearTimeout(timers[which].id);delete timers[which]}if(!timeout_ms)return 0;var id=setTimeout(()=>{delete timers[which];callUserCallback(()=>__emscripten_timeout(which,_emscripten_get_now()))},timeout_ms);timers[which]={id,timeout_ms};return 0};var getHeapMax=()=>2147483648;var alignMemory=(size,alignment)=>Math.ceil(size/alignment)*alignment;var growMemory=size=>{var b=wasmMemory.buffer;var pages=(size-b.byteLength+65535)/65536|0;try{wasmMemory.grow(pages);updateMemoryViews();return 1}catch(e){}};var _emscripten_resize_heap=requestedSize=>{var oldSize=HEAPU8.length;requestedSize>>>=0;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignMemory(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=growMemory(newSize);if(replacement){return true}}return false};var _fd_close=fd=>52;var convertI32PairToI53Checked=(lo,hi)=>hi+2097152>>>0<4194305-!!lo?(lo>>>0)+hi*4294967296:NaN;function _fd_seek(fd,offset_low,offset_high,whence,newOffset){var offset=convertI32PairToI53Checked(offset_low,offset_high);return 70}var printCharBuffers=[null,[],[]];var UTF8Decoder=typeof TextDecoder!="undefined"?new TextDecoder:undefined;var UTF8ArrayToString=(heapOrArray,idx=0,maxBytesToRead=NaN)=>{var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heapOrArray[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.subarray(idx,endPtr))}var str="";while(idx<endPtr){var u0=heapOrArray[idx++];if(!(u0&128)){str+=String.fromCharCode(u0);continue}var u1=heapOrArray[idx++]&63;if((u0&224)==192){str+=String.fromCharCode((u0&31)<<6|u1);continue}var u2=heapOrArray[idx++]&63;if((u0&240)==224){u0=(u0&15)<<12|u1<<6|u2}else{u0=(u0&7)<<18|u1<<12|u2<<6|heapOrArray[idx++]&63}if(u0<65536){str+=String.fromCharCode(u0)}else{var ch=u0-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}}return str};var printChar=(stream,curr)=>{var buffer=printCharBuffers[stream];if(curr===0||curr===10){(stream===1?out:err)(UTF8ArrayToString(buffer));buffer.length=0}else{buffer.push(curr)}};var UTF8ToString=(ptr,maxBytesToRead)=>ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):"";var _fd_write=(fd,iov,iovcnt,pnum)=>{var num=0;for(var i=0;i<iovcnt;i++){var ptr=HEAPU32[iov>>2];var len=HEAPU32[iov+4>>2];iov+=8;for(var j=0;j<len;j++){printChar(fd,HEAPU8[ptr+j])}num+=len}HEAPU32[pnum>>2]=num;return 0};var getCFunc=ident=>{var func=Module["_"+ident];return func};var writeArrayToMemory=(array,buffer)=>{HEAP8.set(array,buffer)};var lengthBytesUTF8=str=>{var len=0;for(var i=0;i<str.length;++i){var c=str.charCodeAt(i);if(c<=127){len++}else if(c<=2047){len+=2}else if(c>=55296&&c<=57343){len+=4;++i}else{len+=3}}return len};var stringToUTF8Array=(str,heap,outIdx,maxBytesToWrite)=>{if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i<str.length;++i){var u=str.charCodeAt(i);if(u>=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx};var stringToUTF8=(str,outPtr,maxBytesToWrite)=>stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite);var stackAlloc=sz=>__emscripten_stack_alloc(sz);var stringToUTF8OnStack=str=>{var size=lengthBytesUTF8(str)+1;var ret=stackAlloc(size);stringToUTF8(str,ret,size);return ret};var ccall=(ident,returnType,argTypes,args,opts)=>{var toC={string:str=>{var ret=0;if(str!==null&&str!==undefined&&str!==0){ret=stringToUTF8OnStack(str)}return ret},array:arr=>{var ret=stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret}};function convertReturnValue(ret){if(returnType==="string"){return UTF8ToString(ret)}if(returnType==="boolean")return Boolean(ret);return ret}var func=getCFunc(ident);var cArgs=[];var stack=0;if(args){for(var i=0;i<args.length;i++){var converter=toC[argTypes[i]];if(converter){if(stack===0)stack=stackSave();cArgs[i]=converter(args[i])}else{cArgs[i]=args[i]}}}var ret=func(...cArgs);function onDone(ret){if(stack!==0)stackRestore(stack);return convertReturnValue(ret)}ret=onDone(ret);return ret};var cwrap=(ident,returnType,argTypes,opts)=>{var numericArgs=!argTypes||argTypes.every(type=>type==="number"||type==="boolean");var numericRet=returnType!=="string";if(numericRet&&numericArgs&&!opts){return getCFunc(ident)}return(...args)=>ccall(ident,returnType,argTypes,args,opts)};var wasmImports={c:___call_sighandler,i:__abort_js,e:__emscripten_runtime_keepalive_clear,f:__setitimer_js,g:_emscripten_resize_heap,h:_fd_close,b:_fd_seek,a:_fd_write,d:_proc_exit};var wasmExports;createWasm();var ___wasm_call_ctors=()=>(___wasm_call_ctors=wasmExports["k"])();var _omni_post_config_default=Module["_omni_post_config_default"]=a0=>(_omni_post_config_default=Module["_omni_post_config_default"]=wasmExports["l"])(a0);var _omni_aed_post_config_default=Module["_omni_aed_post_config_default"]=a0=>(_omni_aed_post_config_default=Module["_omni_aed_post_config_default"]=wasmExports["m"])(a0);var _omni_error_string=Module["_omni_error_string"]=a0=>(_omni_error_string=Module["_omni_error_string"]=wasmExports["n"])(a0);var _omni_free=Module["_omni_free"]=a0=>(_omni_free=Module["_omni_free"]=wasmExports["o"])(a0);var _free=Module["_free"]=a0=>(_free=Module["_free"]=wasmExports["p"])(a0);var _omni_stream_vad_config_default=Module["_omni_stream_vad_config_default"]=a0=>(_omni_stream_vad_config_default=Module["_omni_stream_vad_config_default"]=wasmExports["q"])(a0);var _omni_stream_vad_create_from_buffer=Module["_omni_stream_vad_create_from_buffer"]=(a0,a1,a2,a3)=>(_omni_stream_vad_create_from_buffer=Module["_omni_stream_vad_create_from_buffer"]=wasmExports["r"])(a0,a1,a2,a3);var _omni_stream_vad_clone=Module["_omni_stream_vad_clone"]=(a0,a1)=>(_omni_stream_vad_clone=Module["_omni_stream_vad_clone"]=wasmExports["s"])(a0,a1);var _omni_stream_vad_process=Module["_omni_stream_vad_process"]=(a0,a1,a2,a3)=>(_omni_stream_vad_process=Module["_omni_stream_vad_process"]=wasmExports["t"])(a0,a1,a2,a3);var _omni_stream_vad_process_int16=Module["_omni_stream_vad_process_int16"]=(a0,a1,a2,a3)=>(_omni_stream_vad_process_int16=Module["_omni_stream_vad_process_int16"]=wasmExports["u"])(a0,a1,a2,a3);var _omni_stream_vad_detect_full=Module["_omni_stream_vad_detect_full"]=(a0,a1,a2,a3,a4)=>(_omni_stream_vad_detect_full=Module["_omni_stream_vad_detect_full"]=wasmExports["v"])(a0,a1,a2,a3,a4);var _omni_stream_vad_detect_full_int16=Module["_omni_stream_vad_detect_full_int16"]=(a0,a1,a2,a3,a4)=>(_omni_stream_vad_detect_full_int16=Module["_omni_stream_vad_detect_full_int16"]=wasmExports["w"])(a0,a1,a2,a3,a4);var _omni_stream_vad_reset=Module["_omni_stream_vad_reset"]=a0=>(_omni_stream_vad_reset=Module["_omni_stream_vad_reset"]=wasmExports["x"])(a0);var _omni_stream_vad_get_frame_offset=Module["_omni_stream_vad_get_frame_offset"]=a0=>(_omni_stream_vad_get_frame_offset=Module["_omni_stream_vad_get_frame_offset"]=wasmExports["y"])(a0);var _omni_stream_vad_destroy=Module["_omni_stream_vad_destroy"]=a0=>(_omni_stream_vad_destroy=Module["_omni_stream_vad_destroy"]=wasmExports["z"])(a0);var _omni_vad_create_from_buffer=Module["_omni_vad_create_from_buffer"]=(a0,a1,a2)=>(_omni_vad_create_from_buffer=Module["_omni_vad_create_from_buffer"]=wasmExports["A"])(a0,a1,a2);var _omni_vad_destroy=Module["_omni_vad_destroy"]=a0=>(_omni_vad_destroy=Module["_omni_vad_destroy"]=wasmExports["B"])(a0);var _omni_vad_detect=Module["_omni_vad_detect"]=(a0,a1,a2,a3,a4,a5)=>(_omni_vad_detect=Module["_omni_vad_detect"]=wasmExports["C"])(a0,a1,a2,a3,a4,a5);var _omni_vad_detect_int16=Module["_omni_vad_detect_int16"]=(a0,a1,a2,a3,a4,a5)=>(_omni_vad_detect_int16=Module["_omni_vad_detect_int16"]=wasmExports["D"])(a0,a1,a2,a3,a4,a5);var _omni_vad_detect_probs=Module["_omni_vad_detect_probs"]=(a0,a1,a2,a3,a4)=>(_omni_vad_detect_probs=Module["_omni_vad_detect_probs"]=wasmExports["E"])(a0,a1,a2,a3,a4);var _omni_vad_detect_probs_int16=Module["_omni_vad_detect_probs_int16"]=(a0,a1,a2,a3,a4)=>(_omni_vad_detect_probs_int16=Module["_omni_vad_detect_probs_int16"]=wasmExports["F"])(a0,a1,a2,a3,a4);var _omni_aed_create_from_buffer=Module["_omni_aed_create_from_buffer"]=(a0,a1,a2)=>(_omni_aed_create_from_buffer=Module["_omni_aed_create_from_buffer"]=wasmExports["G"])(a0,a1,a2);var _omni_aed_destroy=Module["_omni_aed_destroy"]=a0=>(_omni_aed_destroy=Module["_omni_aed_destroy"]=wasmExports["H"])(a0);var _omni_aed_detect=Module["_omni_aed_detect"]=(a0,a1,a2,a3,a4,a5)=>(_omni_aed_detect=Module["_omni_aed_detect"]=wasmExports["I"])(a0,a1,a2,a3,a4,a5);var _omni_aed_detect_int16=Module["_omni_aed_detect_int16"]=(a0,a1,a2,a3,a4,a5)=>(_omni_aed_detect_int16=Module["_omni_aed_detect_int16"]=wasmExports["J"])(a0,a1,a2,a3,a4,a5);var _omni_aed_detect_probs=Module["_omni_aed_detect_probs"]=(a0,a1,a2,a3,a4)=>(_omni_aed_detect_probs=Module["_omni_aed_detect_probs"]=wasmExports["K"])(a0,a1,a2,a3,a4);var _omni_aed_detect_probs_int16=Module["_omni_aed_detect_probs_int16"]=(a0,a1,a2,a3,a4)=>(_omni_aed_detect_probs_int16=Module["_omni_aed_detect_probs_int16"]=wasmExports["L"])(a0,a1,a2,a3,a4);var _malloc=Module["_malloc"]=a0=>(_malloc=Module["_malloc"]=wasmExports["M"])(a0);var _omni_chunk_config_default=Module["_omni_chunk_config_default"]=a0=>(_omni_chunk_config_default=Module["_omni_chunk_config_default"]=wasmExports["N"])(a0);var _omni_merge_chunks=Module["_omni_merge_chunks"]=(a0,a1,a2,a3,a4)=>(_omni_merge_chunks=Module["_omni_merge_chunks"]=wasmExports["O"])(a0,a1,a2,a3,a4);var __emscripten_timeout=(a0,a1)=>(__emscripten_timeout=wasmExports["Q"])(a0,a1);var __emscripten_stack_restore=a0=>(__emscripten_stack_restore=wasmExports["R"])(a0);var __emscripten_stack_alloc=a0=>(__emscripten_stack_alloc=wasmExports["S"])(a0);var _emscripten_stack_get_current=()=>(_emscripten_stack_get_current=wasmExports["T"])();Module["ccall"]=ccall;Module["cwrap"]=cwrap;Module["setValue"]=setValue;Module["getValue"]=getValue;var calledRun;dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function run(){if(runDependencies>0){return}preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();readyPromiseResolve(Module);Module["onRuntimeInitialized"]?.();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(()=>{setTimeout(()=>Module["setStatus"](""),1);doRun()},1)}else{doRun()}}if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}run();moduleRtn=readyPromise;
10
10
 
11
11
 
12
12
  return moduleRtn;
Binary file
package/package.json CHANGED
@@ -1,8 +1,13 @@
1
1
  {
2
2
  "name": "omnivad",
3
- "version": "0.2.8",
4
- "description": "OmniVAD — Cross-platform Voice Activity Detection and Audio Event Detection (based on FireRedVAD)",
3
+ "version": "0.2.10",
4
+ "description": "Cross-platform Voice Activity Detection and Audio Event Detection via WebAssembly. Runs in browsers, Web Workers, and Node.js. Built on FireRedVAD. Whisper-ready chunking included.",
5
5
  "license": "Apache-2.0",
6
+ "author": "lifeiteng",
7
+ "homepage": "https://github.com/lifeiteng/OmniVAD-Kit#readme",
8
+ "bugs": {
9
+ "url": "https://github.com/lifeiteng/OmniVAD-Kit/issues"
10
+ },
6
11
  "type": "module",
7
12
  "main": "./dist/index.cjs",
8
13
  "module": "./dist/index.js",
@@ -21,13 +26,21 @@
21
26
  },
22
27
  "files": [
23
28
  "dist",
24
- "models"
29
+ "models",
30
+ "README.md"
25
31
  ],
32
+ "engines": {
33
+ "node": ">=18"
34
+ },
26
35
  "scripts": {
27
36
  "build": "tsup",
28
37
  "dev": "tsup --watch",
29
38
  "typecheck": "tsc --noEmit",
30
- "clean": "rm -rf dist"
39
+ "clean": "rm -rf dist",
40
+ "swap:real": "node scripts/swap-models.mjs real",
41
+ "swap:symlink": "node scripts/swap-models.mjs symlink",
42
+ "prepublishOnly": "node scripts/swap-models.mjs real",
43
+ "postpublish": "node scripts/swap-models.mjs symlink"
31
44
  },
32
45
  "dependencies": {},
33
46
  "devDependencies": {
@@ -39,15 +52,30 @@
39
52
  "vad",
40
53
  "voice-activity-detection",
41
54
  "audio-event-detection",
55
+ "speech-detection",
56
+ "speech-segmentation",
57
+ "audio-segmentation",
58
+ "audio-classification",
59
+ "music-detection",
60
+ "singing-detection",
61
+ "real-time",
62
+ "streaming-vad",
63
+ "whisper",
64
+ "whisperx",
65
+ "asr",
42
66
  "speech",
43
67
  "audio",
44
68
  "wasm",
69
+ "webassembly",
45
70
  "ncnn",
46
71
  "fireredvad",
47
- "omnivad"
72
+ "omnivad",
73
+ "browser",
74
+ "nodejs"
48
75
  ],
49
76
  "repository": {
50
77
  "type": "git",
51
- "url": "https://github.com/lifeiteng/OmniVAD-Kit"
78
+ "url": "https://github.com/lifeiteng/OmniVAD-Kit",
79
+ "directory": "packages/omnivad"
52
80
  }
53
81
  }