Open nshmyrev opened 3 years ago
We need more examples of using it with Unity
Our demo here https://github.com/alphacep/vosk-unity-asr
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.
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 i use Vosk for ios ?
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.
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
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).
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:
Log output, when the issue occurs:
DllNotFoundException: libvosk assembly:
I couldn't add speaker identify for Unity. Is there anything I don't know about this topic?
Hello! I want to use vosk to my school project (android application). I always get this error even though I already added the libvosk.so files (this is where I got them: https://github.com/alphacep/vosk-api/releases). this is where I placed them: BB\Assets\Plugins\Android
Also when I build it and inspect the apk I can see the libvosk.so files in there.
Error message:
DllNotFoundException: libvosk assembly:
Hello! I want to use vosk to my school project (android application). I always get this error even though I already added the libvosk.so files (this is where I got them: https://github.com/alphacep/vosk-api/releases). this is where I placed them: BB\Assets\Plugins\Android
Also when I build it and inspect the apk I can see the libvosk.so files in there.
Error message: DllNotFoundException: libvosk assembly: type: member:(null) Vosk.Model..ctor (System.String model_path) (at Assets/Plugins/Vosk/Model.cs:32) VoskSpeechRecognizer+d__5.MoveNext () (at Assets/_app/Scripts/VoskSpeechRecognizer.cs:46) UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at :0) UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator) VoskSpeechRecognizer:Start() (at Assets/_app/Scripts/VoskSpeechRecognizer.cs:27)
Sup! Seems like you have the same issue as I had year ago. When building project, Vosk dll files are losing somehow, that's why you have this log - you basically don't have necessary dlls in your build. You can try to fix this following steps that I wrote here above: 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.
Hope that would help.
Thanks for the reply! but does this work on Android? I checked the apk in android studio and they were there but still cant seem to work
erm....for some reason it works now. I didnt really followed your instructions since Im not sure if it will work in android, so I asked chatgpt about it (not my proudest moment but I was desperate, sorry).
It mentioned something about the DllImport in the VoskPINVOKE.cs, chatgpt suggests some changes and I followed it and it somehow work. I can finally finish my project lol.
https://github.com/user-attachments/assets/dc3a3946-0b27-4f01-bddb-8a03bf957c14
erm....for some reason it works now. I didnt really followed your instructions since Im not sure if it will work in android, so I asked chatgpt about it (not my proudest moment but I was desperate, sorry).
It mentioned something about the DllImport in the VoskPINVOKE.cs, chatgpt suggests some changes and I followed it and it somehow work. I can finally finish my project lol.
460896679_8719204688109932_5252731827707458091_n.mp4
might be out of context but do you have discord or any way i can contact you? i would like some guidance about this since my game do need this
DllImport in the VoskPINVOKE.cs
uh i tried to build but i dont see any packages in my zipped model?
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.