OnlineCtcFstDecoderConfig.java
1000 字节
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
// Copyright 2024 Xiaomi Corporation
package com.k2fsa.sherpa.onnx;
public class OnlineCtcFstDecoderConfig {
private final String graph;
private final int maxActive;
private OnlineCtcFstDecoderConfig(Builder builder) {
this.graph = builder.graph;
this.maxActive = builder.maxActive;
}
public static Builder builder() {
return new Builder();
}
public String getGraph() {
return graph;
}
public float getMaxActive() {
return maxActive;
}
public static class Builder {
private String graph = "";
private int maxActive = 3000;
public OnlineCtcFstDecoderConfig build() {
return new OnlineCtcFstDecoderConfig(this);
}
public Builder setGraph(String model) {
this.graph = graph;
return this;
}
public Builder setMaxActive(int maxActive) {
this.maxActive = maxActive;
return this;
}
}
}