diff --git a/bindings/java/src/main/java/io/github/ggerganov/whispercpp/WhisperCpp.java b/bindings/java/src/main/java/io/github/ggerganov/whispercpp/WhisperCpp.java index 9abf3a7cab3..6efe6c29142 100644 --- a/bindings/java/src/main/java/io/github/ggerganov/whispercpp/WhisperCpp.java +++ b/bindings/java/src/main/java/io/github/ggerganov/whispercpp/WhisperCpp.java @@ -33,7 +33,7 @@ public File modelDir() { /** * @param modelPath - absolute path, or just the name (eg: "base", "base-en" or "base.en") */ - public Pointer initContext(String modelPath) throws FileNotFoundException { + public void initContext(String modelPath) throws FileNotFoundException { if (ctx != null) { lib.whisper_free(ctx); } @@ -51,7 +51,6 @@ public Pointer initContext(String modelPath) throws FileNotFoundException { if (ctx == null) { throw new FileNotFoundException(modelPath); } - return ctx; } /**