roymacdonald / ofxWhisper

openFrameworks implementation of whisper.cpp
10 stars 3 forks source link

git@github.com: Permission denied (publickey) #1

Closed stephanschulz closed 1 year ago

stephanschulz commented 1 year ago

I think similar to this issue https://github.com/zkmkarlsruhe/ofxTensorFlow2/issues/35#issuecomment-1451153776 I am not able to successfully run the build_lib.sh I used the GitHub desktop to clone your add-on. Screen Shot 2023-03-04 at 6 13 58 PM

roymacdonald commented 1 year ago

I just pushed an update. let me know if that fixed this issue

stephanschulz commented 1 year ago

cp: directory ../libs/whisper_cpp/models does not exist

Screen Shot 2023-03-05 at 12 06 50 PM

roymacdonald commented 1 year ago

fixed that. let me know if it works.

stephanschulz commented 1 year ago

the script seems to work now.

but upon compiling I get this error:

Screen Shot 2023-03-05 at 7 38 03 PM

roymacdonald commented 1 year ago

that is because you need ofxSampleRate. do you have it installed? those missing symbols are from it

danomatika commented 1 year ago

@stephanschulz This issue is likely due to the fact that you are building for arm64, but libsamplerate.a included with ofxSampleRate is x86_64 only. If you scroll up your build output, you will probably see a yellow warning about this: https://github.com/roymacdonald/ofxSampleRate/issues/1

For now, I managed to get the example to run on my M1 machine by replacing the .a with one installed via homebrew:

  1. If not installed, install libsamplerate: brew install libsamplerate
  2. Copy libsamplerate.a to ofxSampleRate. In the ofxWhisper dir, run:
    mv ../ofxSampleRate/libs/libsamplerate/lib/osx/libsamplerate.a ../ofxSampleRate/libs/libsamplerate/lib/osx/libsamplerate-bak.a
    cp /opt/homebrew/lib/libsamplerate.a ../ofxSampleRate/libs/libsamplerate/lib/osx
  3. If doing a release build, disable building for x86_64 by adding "x86_64" to Excluded Architectures in the project's Build Settings
roymacdonald commented 1 year ago

thanks @danomatika! I though that @stephanschulz still had an intel mac, but from looking closer to the screenshots I see it is an arm mac.

stephanschulz commented 1 year ago

correct I am on an M1, macOS 12.6.3

stephanschulz commented 1 year ago

I guess at this point to make it work I will have to follow @danomatika steps. @roymacdonald is there any way your setup sh can already take care of this? it's not that I do not want to do the work, it's more a question of streamlining the setup process :)

roymacdonald commented 1 year ago

Hi stephan, I will make a universal lib (both arm64 and x86_64) and upload it. I dont have an m1 mac so I cant really make a script with the steps that danomatika describes, in particular because I know that the paths where homebrew saves to are different for each architecture.

stephanschulz commented 1 year ago

which brew returns /opt/homebrew/bin/brew on my M1

roymacdonald commented 1 year ago

hi @stephanschulz I added a build_lib.sh script to ofxSampleRate. Can you please update ofxSampleRate and run this new script in it once done update the ofxWhisper example with project generator

stephanschulz commented 1 year ago

I updated both addons. but still get the same error Screen Shot 2023-03-07 at 7 44 56 AM

roymacdonald commented 1 year ago

@stephanschulz did you run the build_libs.sh script in ofxSampleRate? not the one in ofxWhisper

stephanschulz commented 1 year ago

yes I did and now it works on an M1 MBP. thank you very much,