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.7 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 {
private final FeatureConfig featConfig;
2023-08-16 20:16:51 +08:00
private final OnlineModelConfig modelConfig;
2023-04-15 22:17:28 +08:00
private final EndpointConfig endpointConfig;
private final OnlineLMConfig lmConfig;
2023-04-15 22:17:28 +08:00
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
public OnlineRecognizerConfig(
FeatureConfig featConfig,
2023-08-16 20:16:51 +08:00
OnlineModelConfig modelConfig,
2023-04-15 22:17:28 +08:00
EndpointConfig endpointConfig,
2023-08-16 20:16:51 +08:00
OnlineLMConfig lmConfig,
2023-04-15 22:17:28 +08:00
boolean enableEndpoint,
String decodingMethod,
int maxActivePaths,
String hotwordsFile,
float hotwordsScore) {
2023-04-15 22:17:28 +08:00
this.featConfig = featConfig;
this.modelConfig = modelConfig;
this.endpointConfig = endpointConfig;
2023-08-16 20:16:51 +08:00
this.lmConfig = lmConfig;
2023-04-15 22:17:28 +08:00
this.enableEndpoint = enableEndpoint;
this.decodingMethod = decodingMethod;
this.maxActivePaths = maxActivePaths;
this.hotwordsFile = hotwordsFile;
this.hotwordsScore = hotwordsScore;
2023-04-15 22:17:28 +08:00
}
public OnlineLMConfig getLmConfig() {
return lmConfig;
}
2023-04-15 22:17:28 +08:00
public FeatureConfig getFeatConfig() {
return featConfig;
}
2023-08-16 20:16:51 +08:00
public OnlineModelConfig getModelConfig() {
2023-04-15 22:17:28 +08:00
return modelConfig;
}
public EndpointConfig getEndpointConfig() {
return endpointConfig;
}
public boolean isEnableEndpoint() {
return enableEndpoint;
}
public String getDecodingMethod() {
return decodingMethod;
}
public int getMaxActivePaths() {
return maxActivePaths;
}
}