OnlineModelConfig.java
1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
* // Copyright 2022-2023 by zhaoming
*/
package com.k2fsa.sherpa.onnx;
public class OnlineModelConfig {
private final OnlineParaformerModelConfig paraformer;
private final OnlineTransducerModelConfig transducer;
private final OnlineZipformer2CtcModelConfig zipformer2Ctc;
private final String tokens;
private final int numThreads;
private final boolean debug;
private final String provider = "cpu";
private String modelType = "";
public OnlineModelConfig(
String tokens,
int numThreads,
boolean debug,
String modelType,
OnlineParaformerModelConfig paraformer,
OnlineTransducerModelConfig transducer,
OnlineZipformer2CtcModelConfig zipformer2Ctc
) {
this.tokens = tokens;
this.numThreads = numThreads;
this.debug = debug;
this.modelType = modelType;
this.paraformer = paraformer;
this.transducer = transducer;
this.zipformer2Ctc = zipformer2Ctc;
}
public OnlineParaformerModelConfig getParaformer() {
return paraformer;
}
public OnlineTransducerModelConfig getTransducer() {
return transducer;
}
public String getTokens() {
return tokens;
}
public int getNumThreads() {
return numThreads;
}
public boolean getDebug() {
return debug;
}
}