allan-simon / gdextension-vosk-speech-to-text

Godot GDextension allowing to have speech to text in your game using vosk
Apache License 2.0
3 stars 2 forks source link

Error 126: module not found.. on Windows 11 #1

Closed Gamemap closed 7 months ago

Gamemap commented 7 months ago

I'm trying to build this gdextension for godot 4.2.1 stable official, but when opening the editor it outputs this error:

 Can't open dynamic library: D:/FOLDER_STRUCTURE_TO_MY_PROJECT/bin/~libvosk.windows.template_debug.x86_64.dll. Error: Error 126: The specified module could not be found..
  core/extension/gdextension.cpp:719 - GDExtension dynamic library not found: D:/FOLDER_STRUCTURE_TO_MY_PROJECT/bin/~libvosk.windows.template_debug.x86_64.dll
  Failed loading resource: res://bin/vosk.gdextension. Make sure resources have been imported by opening the project in the editor at least once.
  editor/editor_node.cpp:1225 - Condition "!res.is_valid()" is true. Returning: ERR_CANT_OPEN

I used the godot cpp repository for the godot version 4.2.1 (here) and the libvosk.lib and libvosk.dll for windows (here)

This is my vosk.gdextension file in the res://bin/ folder together with the compiled windows template and the libvosk.dll:

[configuration]

entry_symbol = "vosk_library_init"
compatibility_minimum = 4.2

[libraries]
windows.debug.x86_64 = "res://bin/libvosk.windows.template_debug.x86_64.dll"

[dependencies]
windows.debug.x86_64 = {
    "res://bin/libvosk.dll" : ""

Could you help me fixing this problem?

allan-simon commented 7 months ago

I'm not familliar enough with compilation on windows, but on your message the first thing I see is that the error message add a ~ in the path name , as a first step, have you tried copying the file to also be named with a ~ , it's a bit of a hack, but at least it may help troubleshoot

Gamemap commented 7 months ago

Thank you for helping me. The solution to this error was, that I forgot to include all downloaded .dll files from vosk (here) so it couldn't start without the missing files.


For people with the same problem: With this tool you can see which files a programme is trying to load: https://learn.microsoft.com/en-us/sysinternals/downloads/procmon#download