Feature/java bindings2 (#944)

* Java needs to call `whisper_full_default_params_by_ref()`, returning struct by val does not seem to work.
* added convenience methods to WhisperFullParams
* Remove unused WhisperJavaParams
This commit is contained in:
Nicholas Albion
2023-05-29 09:38:58 +10:00
committed by GitHub
parent 9b926844e3
commit d7c936b44a
21 changed files with 419 additions and 242 deletions

View File

@ -6,11 +6,7 @@ This package provides Java JNI bindings for whisper.cpp. They have been tested o
* Ubuntu on x86_64
* Windows on x86_64
The "low level" bindings are in `WhisperCppJnaLibrary` and `WhisperJavaJnaLibrary` which caches `whisper_full_params` and `whisper_context` in `whisper_java.cpp`.
There are a lot of classes in the `callbacks`, `ggml`, `model` and `params` directories but most of them have not been tested.
The most simple usage is as follows:
The "low level" bindings are in `WhisperCppJnaLibrary`. The most simple usage is as follows:
```java
import io.github.ggerganov.whispercpp.WhisperCpp;
@ -48,12 +44,6 @@ In order to build, you need to have the JDK 8 or higher installed. Run the tests
git clone https://github.com/ggerganov/whisper.cpp.git
cd whisper.cpp/bindings/java
mkdir build
pushd build
cmake ..
cmake --build .
popd
./gradlew build
```