lightningRalf / whisper.cpp

Port of OpenAI's Whisper model in C/C++
MIT License
0 stars 0 forks source link

Problems using java binding in Ubuntu #83

Open lightningRalf opened 1 year ago

lightningRalf commented 1 year ago

Hi,

I was trying to use the recently added java binding in ubuntu x86_64 and get a SIGSEGV when calling the fullTranscribe method.

I get same error when trying to run the tests in the binding project:

All tests run correctly but the testFullTranscribe one.

This is the error output:

Starting Gradle Daemon...
Gradle Daemon started in 1 s 148 ms

> Task :compileJava UP-TO-DATE
> Task :processResources UP-TO-DATE
> Task :classes UP-TO-DATE
> Task :compileTestJava UP-TO-DATE
> Task :processTestResources NO-SOURCE
> Task :testClasses UP-TO-DATE
Connected to the target VM, address: 'localhost:46291', transport: 'socket'
> Task :test
whisper_init_from_file_no_state: loading model from '../../models/ggml-tiny.en.bin'
whisper_model_load: loading model
whisper_model_load: n_vocab       = 51864
whisper_model_load: n_audio_ctx   = 1500
whisper_model_load: n_audio_state = 384
whisper_model_load: n_audio_head  = 6
whisper_model_load: n_audio_layer = 4
whisper_model_load: n_text_ctx    = 448
whisper_model_load: n_text_state  = 384
whisper_model_load: n_text_head   = 6
whisper_model_load: n_text_layer  = 4
whisper_model_load: n_mels        = 80
whisper_model_load: ftype         = 1
whisper_model_load: qntvr         = 0
whisper_model_load: type          = 1
whisper_model_load: mem required  =  201,00 MB (+    3,00 MB per decoder)
whisper_model_load: adding 1607 extra tokens
whisper_model_load: model ctx     =   73,62 MB
whisper_model_load: model size    =   73,54 MB
whisper_init_state: kv self size  =    2,62 MB
whisper_init_state: kv cross size =    8,79 MB
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f3a739a0e90, pid=8955, tid=8957
#
# JRE version: OpenJDK Runtime Environment (11.0.19+7) (build 11.0.19+7-post-Ubuntu-0ubuntu122.04.1)
# Java VM: OpenJDK 64-Bit Server VM (11.0.19+7-post-Ubuntu-0ubuntu122.04.1, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# C  [libc.so.6+0x1a0e90]
...

Should I build the library in a different way?

@nalbion, were you able to use this on ubuntu?

Thank you for the help.