V-Sekai / godot-whisper

An GDExtension addon for the Godot Engine that enables realtime audio transcription, supports OpenCL for most platforms, Metal for Apple devices, and runs on a separate thread.
MIT License
69 stars 7 forks source link

Link with OpenCL by default and expose GNU extensions. #80

Closed Nihlus closed 3 months ago

Nihlus commented 3 months ago

This PR adds _GNU_SOURCE to the defines, matching what ggml has in its build system. Not having this defined results in a number of macros being taken up as implicitly-defined functions, which are then not found at runtime.

Additionally, OpenCL is added to the linked libraries unless overridden with OpenCL_LIBRARY in the environment variables. This fixes clBuildProgram not being resolved at runtime.

Android and wasm are currently unhandled by this PR - if anyone from the dev team could take a look at that and give me some pointers, I'd very much appreciate it.

Fixes #73.

fire commented 3 months ago

There seems to be some build failures. Need some help looking into it.

Nihlus commented 3 months ago

There's going to be some fiddling here on my part as I get all the platforms in line with each other.

Ughuuu commented 3 months ago

Got no clue on this, fire I think did the build system for linux. But mostly I would say it's looking at the CMake from whisper and try to replicate in SConstruct.

Would be really cool tho if we could get all platforms(web included) work and build.

However not in this PR, if build passes thats great already and probl can be merged.

Nihlus commented 3 months ago

The remaining build errors appear to be either transient problems (x86_64 on Android) or permisson-related things (Mac build succeeds but can't be signed), so I think we're good to go.

However, I'm only getting nonsense back when I try any input on my device, so it's probably prudent to test on someone else's machine with the built binaries to see if it's a local issue.

Ughuuu commented 3 months ago

Mac signing will pass on main branch. Will make a pr to disable it on non main.

Ughuuu commented 3 months ago

I guess we can disable android x86 if it's not that used

Nihlus commented 3 months ago

Android x86_64 passed in a previous commit, so it's probably a temporary issue that'd go away with a re-run. Try restarting the workflow :)