Add a byte-level BPE Chinese+English non-streaming zipformer model (#1645)

This commit is contained in:
Fangjun Kuang
2024-12-24 16:56:49 +08:00
committed by GitHub
parent fe3265aa25
commit 08d771337b
5 changed files with 127 additions and 0 deletions

View File

@@ -229,6 +229,18 @@ export function getOfflineModelConfig(type: number): OfflineModelConfig {
break;
}
case 23: {
const modelDir = "sherpa-onnx-zipformer-zh-en-2023-11-22";
c.transducer.encoder = `${modelDir}/encoder-epoch-34-avg-19.int8.onnx`;
c.transducer.decoder = `${modelDir}/decoder-epoch-34-avg-19.onnx`;
c.transducer.joiner = `${modelDir}/joiner-epoch-34-avg-19.int8.onnx`;
c.tokens = `${modelDir}/tokens.txt`;
c.modelType = "transducer";
break;
}
default: {
console.log(`Please specify a supported type. Given type ${type}`);
}