-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to begin #6
Comments
Heya! Thank you for your interest in this project of mine! First off, this is one of the first things I've ever put out there, so I am not entirely sure what I'd need to provide in order to help you use this plugin. Secondly, I didn't build this with widespread compatibility in mind, so as far as I know this might only work on Windows. Thirdly, it's been a while since I looked at this project so bear with me while I gather my thoughts and figure out how to clearly communicate what is needed to get this to work. To begin with, I guess I'd start with asking which version of Godot you want to use this in? 4.0? or 4.1? |
Hey, My goal is to make a space invader like game but with some question to respond right by voice to reload the weapon ;) |
I just pushed an update in godot_4.1.1 that updates the project to Godot 4.1.1, fixes references to submodules, and includes the required binaries. If you're lucky, you just need to do two things to get the project to run.
If you need to recompile the binaries, there are up to 3 sets of binary files that may need to be recompiled.
|
Before you get too deep into making this work, I would point out this issue that I found with the Godot engine. My current workaround is to periodically restart the microphone from inside the engine. I don't think it's a deal-breaker, but I think it's worth noting. |
Thanks for the help, I'll try it. |
I got some time to test the extension installation but, of course, I have to recompile it for Linux :
I'm trying to recompile it with |
Thanks for the feedback. Unfortunately it's was sorta expected that it wouldn't be so easy. Looking back upon what I wrote, if we need to recompile the Vosk API for Linux we'd be looking for different files from the ones I mentioned (I said .dll, but that's not what we need on Linux). What issues are you running into when compiling with scons? I'll try to look into compiling the libraries for Linux. |
Finally, I managed to compile library with scon. I had a problem with $ sudo cp vosk-linux-x86_64-0.3.45/libvosk.so /usr/local/lib/ Then launching scons : $ scons platform="linux"
scons: Reading SConscript files ...
Auto-detected 8 CPU cores available for build parallelism. Using 7 cores by default. You can override it with the -j argument.
Building for architecture x86_64 on platform linux
scons: done reading SConscript files.
scons: Building targets ...
scons: `godot-cpp/bin/libgodot-cpp.linux.template_debug.x86_64.a' is up to date.
g++ -o project/bin/lib_vosk_speech_recognizer.linux.template_debug.x86_64.so -Wl,-R,'$ORIGIN' -m64 -march=x86-64 -shared src/register_types.os src/vosk_speech_recognizer.os -Lgodot-cpp/bin -Llibpath -lgodot-cpp.linux.template_debug.x86_64 -lvosk
scons: done building targets. I modified file
Named according to binary file located in :
But I've still got the extension error message when I'm loading project with godot :
Main error message is :
|
One thing to note about gdextension in its current form is that its error messages are actually quite uninformative. It'll give this same error for a number of different issues. Since you used the .so from the standard vosk distribution I think that may be the issue. I'll look into recompiling my modified version of vosk so that we have a library for Linux use. |
I tried recompiling the binaries and putting them in a new branch linux_compatibility. I still need to test it, but I need to figure out how to get Godot on Linux working to test it. |
I copied the $
ERROR: Cannot get class 'AudioEffectCaptureExtend'.
at: instantiate (core/object/class_db.cpp:339)
ERROR: res://default_bus_layout.tres:3 - Parse Error: Can't create sub resource of type: AudioEffectCaptureExtend
at: load (scene/resources/resource_format_text.cpp:550)
ERROR: Failed loading resource: res://default_bus_layout.tres. Make sure resources have been imported by opening the project in the editor at least once.
at: _load (core/io/resource_loader.cpp:273)
WARNING: Blend file import is enabled in the project settings, but no Blender path is configured in the editor settings. Blend files will not be imported.
at: _editor_init (modules/gltf/register_types.cpp:73)
ERROR: Can't open dynamic library: /opt/vosk-godot/project/bin/lib_vosk_speech_recognizer.linux.template_debug.x86_64.so. Error: /opt/vosk-godot/project/bin/lib_vosk_speech_recognizer.linux.template_debug.x86_64.so: undefined symbol: vosk_recognizer_set_timings.
at: open_dynamic_library (drivers/unix/os_unix.cpp:650)
ERROR: GDExtension dynamic library not found: /opt/vosk-godot/project/bin/lib_vosk_speech_recognizer.linux.template_debug.x86_64.so
at: open_library (core/extension/gdextension.cpp:455)
ERROR: Failed loading resource: res://speech_recognizer/vosk_speech_recognizer.gdextension. Make sure resources have been imported by opening the project in the editor at least once.
at: _load (core/io/resource_loader.cpp:273)
SCRIPT ERROR: Parse Error: Could not find base class "VoskSpeechRecognizer".
at: GDScript::reload (res://speech_recognizer/VoskSpeechRecognizer.gd:1)
ERROR: Cannot get class 'VoskSpeechRecognizer'.
at: instantiate (core/object/class_db.cpp:339) |
You copied |
Upon further inspection, I am likely compiling the |
I made another push to linux_compatibility. I was able to test whether or not it runs in an Ubuntu VM and I was able to get it to run without errors. Unfortunately, I haven't set up microphone access in my VM yet, so I haven't been able to test its full capabilities. Please let me know if it works now! I'll figure it out how to test it with microphone access later, if it doesn't work or if you don't get around to testing it. P.S. - Both the |
Hello,
Is it possible to have a little how-to use this plugin ?
Thank you.
The text was updated successfully, but these errors were encountered: