Support non-streaming zipformer CTC ASR models (#2340)
This PR adds support for non-streaming Zipformer CTC ASR models across multiple language bindings, WebAssembly, examples, and CI workflows. - Introduces a new OfflineZipformerCtcModelConfig in C/C++, Python, Swift, Java, Kotlin, Go, Dart, Pascal, and C# APIs - Updates initialization, freeing, and recognition logic to include Zipformer CTC in WASM and Node.js - Adds example scripts and CI steps for downloading, building, and running Zipformer CTC models Model doc is available at https://k2-fsa.github.io/sherpa/onnx/pretrained_models/offline-ctc/icefall/zipformer.html
This commit is contained in:
@@ -75,6 +75,9 @@ class OfflineDecodeFiles
|
||||
[Option("nemo-ctc", Required = false, HelpText = "Path to model.onnx. Used only for NeMo CTC models")]
|
||||
public string NeMoCtc { get; set; } = string.Empty;
|
||||
|
||||
[Option("zipformer-ctc", Required = false, HelpText = "Path to model.onnx. Used only for Zipformer CTC models")]
|
||||
public string ZipformerCtc { get; set; } = string.Empty;
|
||||
|
||||
[Option("dolphin-model", Required = false, Default = "", HelpText = "Path to dolphin ctc model")]
|
||||
public string DolphinModel { get; set; } = string.Empty;
|
||||
|
||||
@@ -240,6 +243,10 @@ to download pre-trained Tdnn models.
|
||||
{
|
||||
config.ModelConfig.Dolphin.Model = options.DolphinModel;
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(options.ZipformerCtc))
|
||||
{
|
||||
config.ModelConfig.ZipformerCtc.Model = options.ZipformerCtc;
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(options.TeleSpeechCtc))
|
||||
{
|
||||
config.ModelConfig.TeleSpeechCtc = options.TeleSpeechCtc;
|
||||
|
||||
Reference in New Issue
Block a user