Open sadrasabouri opened 1 year ago
What is the full output on console, it should print some messages above unless you disabled logging with SetLogLevel?
I tried it by importing SetLogLevel
and setting the log level to 0
, but the output is still the same.
That's Odd.
Maybe you compiled Vosk without CUDA? Seems like that. It returns NULL if no cuda enabled in Makefile
Thanks. I will check it and update this thread.
The same problem
BatchModel("./vosk-model-cn-0.22/")
240 self._handle = _c.vosk_batch_model_new(model_path.encode('utf-8'))
242 if self._handle == _ffi.NULL:
--> 243 raise Exception("Failed to create a model")
Exception: Failed to create a model
@Dreamupers and what is the log output
The same problem. JAVA-8, vosk-0.3.32
LOG (VoskAPI:ReadDataFiles():model.cc:213) Decoding params beam=13 max-active=7000 lattice-beam=6
LOG (VoskAPI:ReadDataFiles():model.cc:216) Silence phones 1:2:3:4:5:6:7:8:9:10
LOG (VoskAPI:RemoveOrphanNodes():nnet-nnet.cc:948) Removed 0 orphan nodes.
LOG (VoskAPI:RemoveOrphanComponents():nnet-nnet.cc:847) Removing 0 orphan components.
LOG (VoskAPI:CompileLooped():nnet-compile-looped.cc:345) Spent 0.293582 seconds in looped compilation.
LOG (VoskAPI:ReadDataFiles():model.cc:248) Loading i-vector extractor from D:/java/vosk-models/vosk-model-cn-0.22/ivector/final.ie
LOG (VoskAPI:ComputeDerivedVars():ivector-extractor.cc:183) Computing derived variables for iVector extractor
LOG (VoskAPI:ComputeDerivedVars():ivector-extractor.cc:204) Done.
LOG (VoskAPI:ReadDataFiles():model.cc:278) Loading HCLG from D:/java/vosk-models/vosk-model-cn-0.22/graph/HCLG.fst
LOG (VoskAPI:ReadDataFiles():model.cc:293) Loading words from D:/java/vosk-models/vosk-model-cn-0.22/graph/words.txt
LOG (VoskAPI:ReadDataFiles():model.cc:302) Loading winfo D:/java/vosk-models/vosk-model-cn-0.22/graph/phones/word_boundary.int
LOG (VoskAPI:ReadDataFiles():model.cc:309) Loading subtract G.fst model from D:/java/vosk-models/vosk-model-cn-0.22/rescore/G.fst
LOG (VoskAPI:ReadDataFiles():model.cc:311) Loading CARPA model from D:/java/vosk-models/vosk-model-cn-0.22/rescore/G.carpa
LOG (VoskAPI:ReadDataFiles():model.cc:317) Loading RNNLM model from D:/java/vosk-models/vosk-model-cn-0.22/rnnlm/final.raw
java.io.IOException: Failed to create a model
at org.vosk.Model.<init>(Model.java:14)
at com.ukefu.webim.util.server.handler.IMEventHandler.processFile(IMEventHandler.java:185)
at com.ukefu.webim.util.server.handler.IMEventHandler.main(IMEventHandler.java:179)
@yujian340 no, it is not the same problem, this issue is about GPU and BatchModel, your code is different
@yujian340不,这不是同一个问题,这个问题是关于GPU和BatchModel的,你的代码是不同的
sorry. my problem
Description
I wanted to test inference on GPU with
BatchModel
. So I started by downloading vosk-model-en-us-0.22.zip and extracting it in a directory namedmodel
in the same directory wherepython/example/test*
are.While using the
test_simple
works fine for this modelUsing the
test_gpu_batch
yields the following error:I wanted to know what can I do to make it work
Environment Details
0.3.45
3.8.10
5.15.0-57-generic
/20.04.1-Ubuntu
Minor Notes