mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-06-19 15:23:45 +00:00
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:
@ -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
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user