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.36k stars 1.04k forks source link

Attempted to read or write protected memory while running C# demo #1524

Closed farhantahir80 closed 4 months ago

farhantahir80 commented 4 months ago

I am using console application of c#. I have installed vosk from nuget manager. When system tries to run this command

VoskRecognizer rec = new VoskRecognizer(model, 16000.0f);

It is giving me an error. 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.'

farhantahir80 commented 4 months ago

I have downloaded the model and it worked...

Can you please share c# example to capture Live speaking from mic and translate?

nshmyrev commented 4 months ago

Microphone code is here:

https://github.com/alphacep/vosk-api/issues/986