diff --git a/sherpa-onnx/java-api/src/com/k2fsa/sherpa/onnx/OfflineModelConfig.java b/sherpa-onnx/java-api/src/com/k2fsa/sherpa/onnx/OfflineModelConfig.java index 0576b0dbc..9e23a3a74 100644 --- a/sherpa-onnx/java-api/src/com/k2fsa/sherpa/onnx/OfflineModelConfig.java +++ b/sherpa-onnx/java-api/src/com/k2fsa/sherpa/onnx/OfflineModelConfig.java @@ -160,12 +160,14 @@ public Builder setModelType(String modelType) { return this; } - public void setModelingUnit(String modelingUnit) { + public Builder setModelingUnit(String modelingUnit) { this.modelingUnit = modelingUnit; + return this; } - public void setBpeVocab(String bpeVocab) { + public Builder setBpeVocab(String bpeVocab) { this.bpeVocab = bpeVocab; + return this; } } } \ No newline at end of file