csukuangfj commited on
Commit
ca207e5
·
1 Parent(s): 519e28e

update model

Browse files
sherpa-onnx-asr.js CHANGED
@@ -364,7 +364,9 @@ function initSherpaOnnxHomophoneReplacerConfig(config, Module) {
364
  const len = 3 * 4;
365
  const ptr = Module._malloc(len);
366
 
367
- const dictDirLen = Module.lengthBytesUTF8(config.dictDir || '') + 1;
 
 
368
  const lexiconLen = Module.lengthBytesUTF8(config.lexicon || '') + 1;
369
  const ruleFstsLen = Module.lengthBytesUTF8(config.ruleFsts || '') + 1;
370
 
@@ -372,7 +374,7 @@ function initSherpaOnnxHomophoneReplacerConfig(config, Module) {
372
 
373
  const buffer = Module._malloc(bufferLen);
374
  let offset = 0
375
- Module.stringToUTF8(config.dictDir || '', buffer + offset, dictDirLen);
376
  offset += dictDirLen;
377
 
378
  Module.stringToUTF8(config.lexicon || '', buffer + offset, lexiconLen);
@@ -426,7 +428,6 @@ function initSherpaOnnxOnlineRecognizerConfig(config, Module) {
426
 
427
  if (!('hr' in config)) {
428
  config.hr = {
429
- dictDir: '',
430
  lexicon: '',
431
  ruleFsts: '',
432
  };
@@ -1247,7 +1248,6 @@ function initSherpaOnnxOfflineRecognizerConfig(config, Module) {
1247
 
1248
  if (!('hr' in config)) {
1249
  config.hr = {
1250
- dictDir: '',
1251
  lexicon: '',
1252
  ruleFsts: '',
1253
  };
 
364
  const len = 3 * 4;
365
  const ptr = Module._malloc(len);
366
 
367
+ const dictDir = '';
368
+
369
+ const dictDirLen = Module.lengthBytesUTF8(dictDir) + 1;
370
  const lexiconLen = Module.lengthBytesUTF8(config.lexicon || '') + 1;
371
  const ruleFstsLen = Module.lengthBytesUTF8(config.ruleFsts || '') + 1;
372
 
 
374
 
375
  const buffer = Module._malloc(bufferLen);
376
  let offset = 0
377
+ Module.stringToUTF8(dictDir, buffer + offset, dictDirLen);
378
  offset += dictDirLen;
379
 
380
  Module.stringToUTF8(config.lexicon || '', buffer + offset, lexiconLen);
 
428
 
429
  if (!('hr' in config)) {
430
  config.hr = {
 
431
  lexicon: '',
432
  ruleFsts: '',
433
  };
 
1248
 
1249
  if (!('hr' in config)) {
1250
  config.hr = {
 
1251
  lexicon: '',
1252
  ruleFsts: '',
1253
  };
sherpa-onnx-wasm-main-vad-asr.js CHANGED
The diff for this file is too large to render. See raw diff
 
sherpa-onnx-wasm-main-vad-asr.wasm CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:c6717d7d3356d470f0c726c8542cfc66d5687d40d455a2923712258fda562251
3
- size 11564954
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a2113e525011e3e7f1fda0dac4004544f04a8c9526a0f79afca651d575115d01
3
+ size 11513955