alphacep / vosk-api

Offline speech recognition API for Android, iOS, Raspberry Pi and servers with Python, Java, C# and Node
Apache License 2.0
7.35k stars 1.04k forks source link

Using vosk models on GPU without a server #1586

Open stevejerol opened 3 weeks ago

stevejerol commented 3 weeks ago

When I try to use gpu for a model, I follow the steps of gpuinit(), BatchModel and BatchRecognizer. But it says ,"failed to create model". How do I overcome this issue

nshmyrev commented 3 weeks ago

You have to compile GPU variant from source. We do not provide prebuilt binaries, only image.

stevejerol commented 3 weeks ago

I'm having some trouble building it from source

postprocessor.cc:19:12: error: 'TokenType' has not been declared in 'fst'
   19 | using fst::TokenType;

I might be doing it wrong, could I get small guide how to built it

nshmyrev commented 3 weeks ago

You can check our docker file with commands here:

https://github.com/alphacep/vosk-server/blob/master/docker/Dockerfile.kaldi-vosk-server-gpu

you need specific version of openfst