Error when use C# nuget package
I have download your nuget package(https://www.nuget.org/packages/Vosk/) and add it to my project but when running i have received this error:
'The type initializer for 'Kaldi.VoskPINVOKE' threw an exception.'
when i run this line code:
Model model = new Model("C:\Users\Admin\Desktop\vosk-model-small-vn-0.3");

Our nuget supports just linux unfortunately, we might add support for windows later.
Thank for answer and i think you should update it soon.I will use this in my robot project.
I have met a new error when use Makefile in Cs folder. No rule for /src/vosk.i (something like this )
No rule for /src/vosk.i (something like this )
Source folder variable is empty in makefile, thats why you have /. You need to substitute path properly I think. You also need swig and kaldi build.
:Thank you for all your answers.
Your nuget package is from Makefile in CS folder, isn't it?
Your nuget package is from Makefile in CS folder, isn't it?
Makefile creates a dll, then you can just use "nuget pack". You can create a similar dll on windows with mingw.
We will do it a bit later, just need some more time.
Any update on Windows version?
TT any update on Window???? it is very neccessary to me!!!!!!!!
Hey guys, a bit more patience please, it will be ready soon.
@broteam168
Hi
Excuse me, I did the same thing, but my error did not go away. What should I do to get rid of my error?
@doctorwho-123 you can give more information about your situation?
@broteam168 I want to run this vosk api to convert speech to text for English in Visual Studio C# environment or how can I compile this vosk api ? https://github.com/alphacep/vosk-api/blob/master/csharp/test.cs My goal is to come and say something through the microphone and convert that code into text using vosk.
you can install C# nuget package from Visual studio using command line or GUI. Then you copy that code to your project(notice this nuget package only run on linux) . Run and feel your result @doctorwho-123
tahnks @broteam168 Do I want to run or compile vosk api use visual staduio c# in Windows? What should I do? I am a beginner in this field? Help me please ?
In case this help you, what I did, although it is hacky, might help you meanwhile they get a nudget package working on windows.
I installed vosk with python and from my c# vs2019 solution captured a converted the voice into a wav file and executed a python script getting the result back into my c# program.
I can try to publish and example in GitHub if you are interested.
@alvaromongon Hello, please explain this step by step using C # code and ... with example and image for visual studio c# in windows .
I will try to set up an example in a GitHub repo during this weekend so you can analyze the code.
Here you have it @doctorwho-123
https://github.com/alvaromongon/windows-csharp-vosk-api
Read the readme first, there are some dependencies.
@alvaromongon Thank you very much. How can I replace the Spanish model with an English model?
I have updated the information in the readme.md file about how the Vosk is used and where should it be located.
Please take a look and investigate.
@nshmyrev Can you give me a time for this update? I want to have a plan with this!!