radames commited on
Commit
d63efb0
1 Parent(s): 7864eaa
Files changed (5) hide show
  1. Dockerfile +1 -1
  2. ggml-tiny.en.bin +3 -0
  3. helpers.js +0 -1
  4. index.html +1 -1
  5. libmain.worker.js +1 -0
Dockerfile CHANGED
@@ -1,3 +1,3 @@
1
- FROM nginx
2
  COPY ./nginx.conf /etc/nginx/conf.d/default.conf
3
  COPY . /usr/share/nginx/html
 
1
+ FROM nginxinc/nginx-unprivileged
2
  COPY ./nginx.conf /etc/nginx/conf.d/default.conf
3
  COPY . /usr/share/nginx/html
ggml-tiny.en.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:921e4cf8686fdd993dcd081a5da5b6c365bfde1162e72b08d75ac75289920b1f
3
+ size 77704715
helpers.js CHANGED
@@ -36,7 +36,6 @@ async function fetchRemote(url, cbProgress, cbPrint) {
36
  headers: {
37
  'Content-Type': 'application/octet-stream',
38
  },
39
- mode: 'no-cors'
40
  }
41
  );
42
 
 
36
  headers: {
37
  'Content-Type': 'application/octet-stream',
38
  },
 
39
  }
40
  );
41
 
index.html CHANGED
@@ -294,7 +294,7 @@
294
 
295
  function loadWhisper(model) {
296
  let urls = {
297
- 'tiny.en': 'https://huggingface.co/datasets/ggerganov/whisper.cpp/resolve/main/ggml-tiny.en.bin',
298
  'tiny': 'https://huggingface.co/datasets/ggerganov/whisper.cpp/resolve/main/ggml-whisper-tiny.bin',
299
  'base.en': 'https://huggingface.co/datasets/ggerganov/whisper.cpp/resolve/main/ggml-whisper-base.en.bin',
300
  'base': 'https://huggingface.co/datasets/ggerganov/whisper.cpp/resolve/main/ggml-whisper-base.bin',
 
294
 
295
  function loadWhisper(model) {
296
  let urls = {
297
+ 'tiny.en': 'ggml-tiny.en.bin',
298
  'tiny': 'https://huggingface.co/datasets/ggerganov/whisper.cpp/resolve/main/ggml-whisper-tiny.bin',
299
  'base.en': 'https://huggingface.co/datasets/ggerganov/whisper.cpp/resolve/main/ggml-whisper-base.en.bin',
300
  'base': 'https://huggingface.co/datasets/ggerganov/whisper.cpp/resolve/main/ggml-whisper-base.bin',
libmain.worker.js ADDED
@@ -0,0 +1 @@
 
 
1
+ "use strict";var Module={};var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string";if(ENVIRONMENT_IS_NODE){var nodeWorkerThreads=require("worker_threads");var parentPort=nodeWorkerThreads.parentPort;parentPort.on("message",data=>onmessage({data:data}));var fs=require("fs");Object.assign(global,{self:global,require:require,Module:Module,location:{href:__filename},Worker:nodeWorkerThreads.Worker,importScripts:function(f){(0,eval)(fs.readFileSync(f,"utf8")+"//# sourceURL="+f)},postMessage:function(msg){parentPort.postMessage(msg)},performance:global.performance||{now:function(){return Date.now()}}})}var initializedJS=false;var pendingNotifiedProxyingQueues=[];function threadPrintErr(){var text=Array.prototype.slice.call(arguments).join(" ");if(ENVIRONMENT_IS_NODE){fs.writeSync(2,text+"\n");return}console.error(text)}function threadAlert(){var text=Array.prototype.slice.call(arguments).join(" ");postMessage({cmd:"alert",text:text,threadId:Module["_pthread_self"]()})}var err=threadPrintErr;self.alert=threadAlert;Module["instantiateWasm"]=(info,receiveInstance)=>{var instance=new WebAssembly.Instance(Module["wasmModule"],info);receiveInstance(instance);Module["wasmModule"]=null;return instance.exports};self.onunhandledrejection=e=>{throw e.reason??e};self.onmessage=e=>{try{if(e.data.cmd==="load"){Module["wasmModule"]=e.data.wasmModule;for(const handler of e.data.handlers){Module[handler]=function(){postMessage({cmd:"callHandler",handler:handler,args:[...arguments]})}}Module["wasmMemory"]=e.data.wasmMemory;Module["buffer"]=Module["wasmMemory"].buffer;Module["ENVIRONMENT_IS_PTHREAD"]=true;if(typeof e.data.urlOrBlob=="string"){importScripts(e.data.urlOrBlob)}else{var objectUrl=URL.createObjectURL(e.data.urlOrBlob);importScripts(objectUrl);URL.revokeObjectURL(objectUrl)}}else if(e.data.cmd==="run"){Module["__performance_now_clock_drift"]=performance.now()-e.data.time;Module["__emscripten_thread_init"](e.data.pthread_ptr,0,0,1);Module["establishStackSpace"]();Module["PThread"].receiveObjectTransfer(e.data);Module["PThread"].threadInitTLS();if(!initializedJS){Module["__embind_initialize_bindings"]();pendingNotifiedProxyingQueues.forEach(queue=>{Module["executeNotifiedProxyingQueue"](queue)});pendingNotifiedProxyingQueues=[];initializedJS=true}try{Module["invokeEntryPoint"](e.data.start_routine,e.data.arg)}catch(ex){if(ex!="unwind"){if(ex instanceof Module["ExitStatus"]){if(Module["keepRuntimeAlive"]()){}else{Module["__emscripten_thread_exit"](ex.status)}}else{throw ex}}}}else if(e.data.cmd==="cancel"){if(Module["_pthread_self"]()){Module["__emscripten_thread_exit"](-1)}}else if(e.data.target==="setimmediate"){}else if(e.data.cmd==="processProxyingQueue"){if(initializedJS){Module["executeNotifiedProxyingQueue"](e.data.queue)}else{pendingNotifiedProxyingQueues.push(e.data.queue)}}else if(e.data.cmd){err("worker.js received unknown command "+e.data.cmd);err(e.data)}}catch(ex){if(Module["__emscripten_thread_crashed"]){Module["__emscripten_thread_crashed"]()}throw ex}};