Add WebAssembly for SenseVoice (#1158)

This commit is contained in:
Fangjun Kuang
2024-07-21 15:39:55 +08:00
committed by GitHub
parent c3260ef842
commit 70d14353bb
21 changed files with 383 additions and 351 deletions

View File

@@ -13,17 +13,6 @@ function createOfflineRecognizer() {
};
let modelConfig = {
transducer: {
encoder: '',
decoder: '',
joiner: '',
},
paraformer: {
model: '',
},
nemoCtc: {
model: '',
},
whisper: {
encoder: './sherpa-onnx-whisper-tiny.en/tiny.en-encoder.int8.onnx',
decoder: './sherpa-onnx-whisper-tiny.en/tiny.en-decoder.int8.onnx',
@@ -31,9 +20,6 @@ function createOfflineRecognizer() {
task: 'transcribe',
tailPaddings: -1,
},
tdnn: {
model: '',
},
tokens: './sherpa-onnx-whisper-tiny.en/tiny.en-tokens.txt',
numThreads: 1,
debug: 0,
@@ -41,19 +27,10 @@ function createOfflineRecognizer() {
modelType: 'whisper',
};
let lmConfig = {
model: '',
scale: 1.0,
};
let config = {
featConfig: featConfig,
modelConfig: modelConfig,
lmConfig: lmConfig,
decodingMethod: 'greedy_search',
maxActivePaths: 4,
hotwordsFile: '',
hotwordsScore: 1.5,
};
return sherpa_onnx.createOfflineRecognizer(config);