JAVA-API: Manual Library Loading Support for Restricted Environments (#2253)
* feat: Added LibraryLoader that allows loading to be skipped * feat: Changed static call to new LibraryLoader * feat: Makefile adjustment
This commit is contained in:
@@ -4,13 +4,10 @@ package com.k2fsa.sherpa.onnx;
|
||||
|
||||
|
||||
public class OfflineTts {
|
||||
static {
|
||||
System.loadLibrary("sherpa-onnx-jni");
|
||||
}
|
||||
|
||||
private long ptr = 0;
|
||||
|
||||
public OfflineTts(OfflineTtsConfig config) {
|
||||
LibraryLoader.maybeLoad();
|
||||
ptr = newFromFile(config);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user