GlaDOS icon indicating copy to clipboard operation
GlaDOS copied to clipboard

Add Mac compatability.

Open johnrtipton opened this issue 1 year ago • 3 comments

DRAFT: Add Mac compatibility, I need to do some cleanup still, this is a rough implementation.

johnrtipton avatar May 01 '24 15:05 johnrtipton

Installing espeak-ng through homebrew and doing the mentioned change above, espeak is not directly crashing and works for some time until I run into mentioned error. I'm still investigating what is happening there. Any clues?

Traxmaxx avatar May 03 '24 09:05 Traxmaxx

I've been doing some refactor locally, which I think could go into this PR.

Instead of relying on manually compiled and installed libraries, my suggestion would be an init script that:

  1. Enters a Python venv
  2. Checks for libwhisper, if not found, pulls the git repo, builds it, and copies the appropriate files into a local path
  3. Checks for libespeak-ng, if not found, pulls the git repo, builds it, and copies the appropriate files into a local path
  4. Checks for llama.cpp, and you guessed it right, if not found, pulls the git repo, builds it, and copies the appropriate files into a local path
  5. Installs all Python dependencies
  6. Starts the main app

Optionally it could also prompt for installing the make/cmake/etc. build tools as needed, though with all the different distros, this might be a task a smidge too big.

I'd also go for masking ctypes.cdll.LoadLibrary with a custom method that takes care of the dylib or so checking (note that e.g. libwhisper still builds a .so file on macOS, so on Darwin platforms it's best to check first for dylib then for so and only if neither are found, throw the exception).

fonix232 avatar May 03 '24 15:05 fonix232

@dnhkng please see my above comment to expand on the discussion under #11

fonix232 avatar May 03 '24 15:05 fonix232

We now use the espeak-ng binary, as it resolves the segfault issues, so I am closing this,

dnhkng avatar May 11 '24 08:05 dnhkng