Reduce model initialization time for offline speech recognition (#213)

This commit is contained in:
Fangjun Kuang
2023-07-14 18:07:27 +08:00
committed by GitHub
parent 0abd7ce881
commit f3206c49dc
10 changed files with 109 additions and 36 deletions

View File

@@ -76,6 +76,8 @@ namespace SherpaOnnx
Tokens = "";
NumThreads = 1;
Debug = 0;
Provider = "cpu";
ModelType = "";
}
public OfflineTransducerModelConfig Transducer;
public OfflineParaformerModelConfig Paraformer;
@@ -87,6 +89,12 @@ namespace SherpaOnnx
public int NumThreads;
public int Debug;
[MarshalAs(UnmanagedType.LPStr)]
public string Provider;
[MarshalAs(UnmanagedType.LPStr)]
public string ModelType;
}
[StructLayout(LayoutKind.Sequential)]