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/OnlineRecognizerConfig.java

67 lines
1.8 KiB
Java
Raw Normal View History

2023-04-15 22:17:28 +08:00
/*
* // Copyright 2022-2023 by zhaoming
*/
package com.k2fsa.sherpa.onnx;
public class OnlineRecognizerConfig {
2024-02-26 13:49:37 +08:00
private final FeatureConfig featConfig;
private final OnlineModelConfig modelConfig;
private final EndpointConfig endpointConfig;
private final OnlineLMConfig lmConfig;
private final boolean enableEndpoint;
private final String decodingMethod;
private final int maxActivePaths;
private final String hotwordsFile;
private final float hotwordsScore;
2023-04-15 22:17:28 +08:00
2024-02-26 13:49:37 +08:00
public OnlineRecognizerConfig(
FeatureConfig featConfig,
OnlineModelConfig modelConfig,
EndpointConfig endpointConfig,
OnlineLMConfig lmConfig,
boolean enableEndpoint,
String decodingMethod,
int maxActivePaths,
String hotwordsFile,
float hotwordsScore) {
this.featConfig = featConfig;
this.modelConfig = modelConfig;
this.endpointConfig = endpointConfig;
this.lmConfig = lmConfig;
this.enableEndpoint = enableEndpoint;
this.decodingMethod = decodingMethod;
this.maxActivePaths = maxActivePaths;
this.hotwordsFile = hotwordsFile;
this.hotwordsScore = hotwordsScore;
}
2023-04-15 22:17:28 +08:00
2024-02-26 13:49:37 +08:00
public OnlineLMConfig getLmConfig() {
return lmConfig;
}
2024-02-26 13:49:37 +08:00
public FeatureConfig getFeatConfig() {
return featConfig;
}
2023-04-15 22:17:28 +08:00
2024-02-26 13:49:37 +08:00
public OnlineModelConfig getModelConfig() {
return modelConfig;
}
2023-04-15 22:17:28 +08:00
2024-02-26 13:49:37 +08:00
public EndpointConfig getEndpointConfig() {
return endpointConfig;
}
2023-04-15 22:17:28 +08:00
2024-02-26 13:49:37 +08:00
public boolean isEnableEndpoint() {
return enableEndpoint;
}
2023-04-15 22:17:28 +08:00
2024-02-26 13:49:37 +08:00
public String getDecodingMethod() {
return decodingMethod;
}
2023-04-15 22:17:28 +08:00
2024-02-26 13:49:37 +08:00
public int getMaxActivePaths() {
return maxActivePaths;
}
2023-04-15 22:17:28 +08:00
}