-
Notifications
You must be signed in to change notification settings - Fork 20
feat(config): add customizable curl path and improve options #38
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
base: master
Are you sure you want to change the base?
Conversation
This commit enhances the script's flexibility by allowing users to provide their own whisper.cpp executable and model files, bypassing the automatic installation and download process.
This is particularly useful for users who:
Install whisper.cpp using a package manager like Homebrew.
Prefer to manage their model files in a centralized directory.
Changes introduced:
whisper-cli-path: A new user option to specify the absolute path to the whisper-cli executable. If set, the script will use this executable directly.
whisper-models-directory: A new user option to specify the path to a directory containing the ggml-*.bin model files.
The installation and model download logic in whisper--check-install-and-run is now skipped if these variables are configured, preventing unnecessary installation attempts.
This makes the package more accommodating to various user workflows and environments without altering the default behavior for new users.
add whisper-curl-path defcustom to allow specifying curl executable location set :type for whisper-transcription-buffer-namer to 'function for clarity use whisper-curl-path in process command instead of hardcoded "curl" comment out directory deletion on failed manual install for safety Note: do not delete the directory if downloading model fails
|
So I am not, in isolation, fundamentally opposed to the idea. However, because we already have too many variables, I would have to push back a little. If you have Or if you are opposed to doing that from outside (maybe because it would have system-wide effect), from inside Emacs you can still add a path to
I guess if some model download fails, it's not nice that other already downloaded files gets deleted. However the clean-up is mainly there because of compilation failures, not download failures. If there are some weird reasons why compilation couldn't complete, it's definitely best to start from scratch again. Unfortunately we can't differentiate compilation failure with download failure. Maybe we could do
This is a good idea, thanks. |
|
So Here is the MacOS packaged version - Here is Homebrew installed version this location has already been added to path My company blocks huggingface domains, so I had to download pt(PyTorch) files and convert it to ggml. While the build is successful, I was not able to download the models and the directory disappears. |
|
Thanks for the explanation, makes sense in that case and I will get to it later. Though I am a little perplexed about why Emacs would pick the wrong curl. Maybe $PATH had the wrong order/precedence? Can you check that your (setq exec-path (remove "/opt/homebrew/opt/curl/bin" exec-path)) ;; might not be at the top initially, so remove first
(setq exec-path (cons "/opt/homebrew/opt/curl/bin" exec-path)) |
This worked that's. It was a priority issue after all. |
add whisper-curl-path defcustom to allow specifying curl executable location
set :type for whisper-transcription-buffer-namer to 'function for clarity
use whisper-curl-path in process command instead of hardcoded "curl"
comment out directory deletion on failed manual install for safety
Note: do not delete the directory if downloading model fails