vosk-api icon indicating copy to clipboard operation
vosk-api copied to clipboard

Unity Support

Open nshmyrev opened this issue 2 years ago • 10 comments

There are projects like

https://github.com/Babilinski/vosk-stt-unity

and

https://github.com/Yeti47/Vosk4Unity

Eventually we need to have our own project for that.

nshmyrev avatar Sep 18 '21 23:09 nshmyrev

We need more examples of using it with Unity

AmmarSalimDa avatar Oct 18 '21 17:10 AmmarSalimDa

Our demo here https://github.com/alphacep/vosk-unity-asr

nshmyrev avatar Jul 29 '22 11:07 nshmyrev

hey, when I build my project Vosk doesn't work. From my understanding I am meant to put some files in the build file, but I don't know the exact details.

HezBen avatar May 26 '23 16:05 HezBen

hey, when I build my project Vosk doesn't work. From my understanding I am meant to put some files in the build file, but I don't know the exact details.

Never mind, I got it. turned out all my DLLs were not set up and I just forgot they existed.

HezBen avatar May 27 '23 16:05 HezBen

Can i use Vosk for ios ?

ehabtawfikelbwab avatar Nov 21 '23 22:11 ehabtawfikelbwab

hey, when I build my project Vosk doesn't work. From my understanding I am meant to put some files in the build file, but I don't know the exact details.

Never mind, I got it. turned out all my DLLs were not set up and I just forgot they existed.

Can you please provide details how did you fix it? Seems like I have the same problem with DLLs when building project with Vosk. Thank you.

Fortythird avatar Dec 03 '23 00:12 Fortythird

hey, when I build my project Vosk doesn't work. From my understanding I am meant to put some files in the build file, but I don't know the exact details.

Never mind, I got it. turned out all my DLLs were not set up and I just forgot they existed.

Can you please provide details how did you fix it? Seems like I have the same problem with DLLs when building project with Vosk. Thank you.

The issues I was having was directly related to the fact that I wasn't setting them up in unity. If I remember correctly I needed to find the dlls file in unity and set which ones were used in the inspector. I can't remember how, its been a while. I am trying to look up the stuff right now

HezBen avatar Dec 03 '23 19:12 HezBen

hey, when I build my project Vosk doesn't work. From my understanding I am meant to put some files in the build file, but I don't know the exact details.

Never mind, I got it. turned out all my DLLs were not set up and I just forgot they existed.

Can you please provide details how did you fix it? Seems like I have the same problem with DLLs when building project with Vosk. Thank you.

The issues I was having was directly related to the fact that I wasn't setting them up in unity. If I remember correctly I needed to find the dlls file in unity and set which ones were used in the inspector. I can't remember how, its been a while. I am trying to look up the stuff right now

Thank you for information, I will study the issue in this direction. Please, write here if you will find solution (so will I).

Fortythird avatar Dec 04 '23 02:12 Fortythird

Well, I didn't expect find solution that fast.

Anyway, here are all details related to the issue I had. Problem: missing Vosk-related DLLs when building Unity project for Windows.

Solution:

  1. Build project.
  2. In build directory open "Your-project-name"_Data -> Plugins -> x86_64. Here you will find couple of DLLs.
  3. In zip-file of your Vosk model open Packages -> Vosk -> Runtime -> Plugins -> Windows. Drag and drop all DLLs from this directory to directory in previous step.
  4. Now your project has to work properly.

Log output, when the issue occurs: DllNotFoundException: libvosk assembly: type: member:(null) at (wrapper managed-to-native) Vosk.VoskPINVOKE.new_Model(string) at Vosk.Model..ctor (System.String model_path) [0x00000] in C:\Users\ "username" \ "Project name"\Assets\ThirdParty\Vosk\Model.cs:32 at VoskSpeechToText+<DoStartVoskStt>d__25.MoveNext () [0x000d5] in C:\Users\ "username" \ "Project name"\Assets\Scripts\VoskSpeechToText.cs:150 at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) [0x00020] in C:\buildslave\unity\build\Runtime\Export\Scripting\Coroutines.cs:17

Fortythird avatar Dec 04 '23 02:12 Fortythird

I couldn't add speaker identify for Unity. Is there anything I don't know about this topic?

rehberim360 avatar May 02 '24 13:05 rehberim360