nalbion commited on
Commit
84f8053
·
1 Parent(s): 1771dce

updated README for java

Browse files
Files changed (1) hide show
  1. bindings/java/README.md +8 -4
bindings/java/README.md CHANGED
@@ -14,13 +14,10 @@ import io.github.ggerganov.whispercpp.WhisperCpp;
14
  public class Example {
15
 
16
  public static void main(String[] args) {
17
- String modelpath;
18
  WhisperCpp whisper = new WhisperCpp();
19
  // By default, models are loaded from ~/.cache/whisper/ and are usually named "ggml-${name}.bin"
20
  // or you can provide the absolute path to the model file.
21
- whisper.initContext("base.en");
22
-
23
- long context = whisper.initContext(modelpath);
24
  try {
25
  whisper.fullTranscribe(context, samples);
26
 
@@ -47,6 +44,13 @@ cd whisper.cpp/bindings/java
47
  ./gradlew build
48
  ```
49
 
 
 
 
 
 
 
 
50
  ## License
51
 
52
  The license for the Go bindings is the same as the license for the rest of the whisper.cpp project, which is the MIT License. See the `LICENSE` file for more details.
 
14
  public class Example {
15
 
16
  public static void main(String[] args) {
 
17
  WhisperCpp whisper = new WhisperCpp();
18
  // By default, models are loaded from ~/.cache/whisper/ and are usually named "ggml-${name}.bin"
19
  // or you can provide the absolute path to the model file.
20
+ long context = whisper.initContext("base.en");
 
 
21
  try {
22
  whisper.fullTranscribe(context, samples);
23
 
 
44
  ./gradlew build
45
  ```
46
 
47
+ You need to have the `whisper` library in your [JNA library path](https://java-native-access.github.io/jna/4.2.1/com/sun/jna/NativeLibrary.html). On Windows the dll is included in the jar and you can update it:
48
+
49
+ ```bash
50
+ copy /y ..\..\build\bin\Release\whisper.dll build\generated\resources\main\win32-x86-64\whisper.dll
51
+ ```
52
+
53
+
54
  ## License
55
 
56
  The license for the Go bindings is the same as the license for the rest of the whisper.cpp project, which is the MIT License. See the `LICENSE` file for more details.