csukuangfj commited on
Commit
2a538ab
1 Parent(s): fa3fcd3

update model

Browse files
sherpa-onnx-asr.js CHANGED
@@ -280,7 +280,7 @@ function initSherpaOnnxOnlineRecognizerConfig(config, Module) {
280
  const ctcFstDecoder = initSherpaOnnxOnlineCtcFstDecoderConfig(
281
  config.ctcFstDecoderConfig, Module)
282
 
283
- const len = feat.len + model.len + 8 * 4 + ctcFstDecoder.len + 2 * 4;
284
  const ptr = Module._malloc(len);
285
 
286
  let offset = 0;
@@ -351,6 +351,9 @@ function initSherpaOnnxOnlineRecognizerConfig(config, Module) {
351
  buffer + decodingMethodLen + hotwordsFileLen + ruleFstsFileLen, 'i8*');
352
  offset += 4;
353
 
 
 
 
354
  return {
355
  buffer: buffer, ptr: ptr, len: len, feat: feat, model: model,
356
  ctcFstDecoder: ctcFstDecoder
@@ -796,7 +799,7 @@ function initSherpaOnnxOfflineRecognizerConfig(config, Module) {
796
  const model = initSherpaOnnxOfflineModelConfig(config.modelConfig, Module);
797
  const lm = initSherpaOnnxOfflineLMConfig(config.lmConfig, Module);
798
 
799
- const len = feat.len + model.len + lm.len + 6 * 4;
800
  const ptr = Module._malloc(len);
801
 
802
  let offset = 0;
@@ -856,6 +859,9 @@ function initSherpaOnnxOfflineRecognizerConfig(config, Module) {
856
  'i8*');
857
  offset += 4;
858
 
 
 
 
859
  return {
860
  buffer: buffer, ptr: ptr, len: len, feat: feat, model: model, lm: lm
861
  }
 
280
  const ctcFstDecoder = initSherpaOnnxOnlineCtcFstDecoderConfig(
281
  config.ctcFstDecoderConfig, Module)
282
 
283
+ const len = feat.len + model.len + 8 * 4 + ctcFstDecoder.len + 3 * 4;
284
  const ptr = Module._malloc(len);
285
 
286
  let offset = 0;
 
351
  buffer + decodingMethodLen + hotwordsFileLen + ruleFstsFileLen, 'i8*');
352
  offset += 4;
353
 
354
+ Module.setValue(ptr + offset, config.blankPenalty || 0, 'float');
355
+ offset += 4;
356
+
357
  return {
358
  buffer: buffer, ptr: ptr, len: len, feat: feat, model: model,
359
  ctcFstDecoder: ctcFstDecoder
 
799
  const model = initSherpaOnnxOfflineModelConfig(config.modelConfig, Module);
800
  const lm = initSherpaOnnxOfflineLMConfig(config.lmConfig, Module);
801
 
802
+ const len = feat.len + model.len + lm.len + 7 * 4;
803
  const ptr = Module._malloc(len);
804
 
805
  let offset = 0;
 
859
  'i8*');
860
  offset += 4;
861
 
862
+ Module.setValue(ptr + offset, config.blankPenalty || 0, 'float');
863
+ offset += 4;
864
+
865
  return {
866
  buffer: buffer, ptr: ptr, len: len, feat: feat, model: model, lm: lm
867
  }
sherpa-onnx-wasm-main-asr.js CHANGED
The diff for this file is too large to render. See raw diff
 
sherpa-onnx-wasm-main-asr.wasm CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:6ed30498d09ea41806ee09d0ebacf23ee0bc31062d839e2f764cbc5381dda5e7
3
- size 11336394
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:75a71070a3afbca4b093d46d069b980645ff6eddcdccaefaabb92eb207f4a4af
3
+ size 11336914