This repository has been archived on 2025-08-26. You can view files and clone it, but cannot push or open issues or pull requests.
Files
enginex-mr_series-sherpa-onnx/sherpa-onnx/java-api/src/com/k2fsa/sherpa/onnx/OnlineCtcFstDecoderConfig.java
2024-04-28 22:26:04 +08:00

44 lines
1000 B
Java

// 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;
}
}
}