From 6854b1a3819f10f7b10c35e4acb346fd0c9129cd Mon Sep 17 00:00:00 2001 From: litongjava Date: Sat, 21 Oct 2023 09:08:50 -1000 Subject: [PATCH] change return type to void --- .../main/java/io/github/ggerganov/whispercpp/WhisperCpp.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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; } /**