Open ghost opened 1 year ago
I had the same issue, the problem is that you don't habe the binaries downloaded as the project doesn't support git lfs. You can downlad the files from the whisper.cpp repo, name them correctly and the put them in the src-tauri/binaries folder. Hope this helps :)
I had the same issue, the problem is that you don't habe the binaries downloaded as the project doesn't support git lfs. You can downlad the files from the whisper.cpp repo, name them correctly and the put them in the src-tauri/binaries folder. Hope this helps :)
Could you please provide more information on how the binaries need to be named?
To set up Whisper on Mac OS, you need to follow these steps:
Download ffmpeg
and ffprobe
from ffmpeg.org/download.html. Rename them to ffmpeg-x86_64-apple-darwin
and ffprobe-x86_64-apple-darwin
.
Follow the guide provided in blog.castopod.org/install-whisper-cpp-on-your-mac-in-5mn-and-transcribe-all-your-podcasts-for-free/ to obtain the whisper.cpp
file for Mac OS.
Rename the whisper
binary to whisper-x86_64-apple-darwin
.
Download the model of your choice from huggingface.co/ggerganov/whisper.cpp or ggml.ggerganov.com/.
Place the downloaded model file in the src-tauri/resources/models
folder.
Change the name of the modelpath
variable in the src/lib/util/whisper.ts
file to the name of your model.
If you have any other questions, please post them here and I will try to help you. :)
From your instructions, I got the program to build and launch on Linux. Thank you so much! When I try to upload an audio file (e.g., .mp3) to transcribe, the program does not get past determining length and when I ask it to transcribe, it says that something went wrong. I suspect that it may have something to do with the ffmpeg binary. Do you have any ideas on this?
If you are having issues with Whisper on Linux, here are some troubleshooting steps:
Check the console log files for any errors and paste them into Chat GPT for assistance.
Verify that the file naming conventions are correct for Linux. On Linux, files should have "unknown-linux-gnu" instead of "apple-darwin" in the name. More information can be found here: tauri.app/v1/api/config/#bundleconfig.externalbin:~:text=the%20macOS%20bundles.-externalBin-array%3F.
Try these steps and let me know if you need further assistance.
For those trying @JugoBonito 's approach (which works, thank you Philipp!), here's how I went about it, modifying the original step-by-step:
To set up Whisper on Mac OS, you need to follow these steps:
tauri dev
and notice the error your getTauri will emit something like:
Caused by:
process didn't exit successfully: `/Users/username/Downloads/whisper-ui-main/src-tauri/target/release/build/whisper-ui-37424a52488d5e66/build-script-build` (exit status: 1)
--- stdout
cargo:rerun-if-env-changed=TAURI_CONFIG
cargo:rerun-if-changed=tauri.conf.json
cargo:rustc-cfg=desktop
path matching binaries/whisper-aarch64-apple-darwin not found.
warning: build failed, waiting for other jobs to finish...
Error failed to build app: failed to build app
Notice the error is hidden between the last cargo:rustc
and the warning
:
**path matching binaries/whisper-aarch64-apple-darwin not found.**
This aarch64
is the platform the app inferred from your system. It could be something else, take note of it - we'll use it later on.
Unzip these files and move their executable file into src-tauri/binaries
of this repository. Now, rename each of them to include the platform we found in step 1.:
ffmpeg
-> ffmpeg-[YOUR_PLATFORM]-apple-darwin
(mine is ffmpeg-aarch64-apple-darwin
)ffprobe
-> ffprobe-[YOUR-PLATFORM]-apple-darwin
Follow the guide provided in blog.castopod.org/install-whisper-cpp-on-your-mac-in-5mn-and-transcribe-all-your-podcasts-for-free/ to clone, compile and download your model of choice for whisper.cpp.
In the folder of the whisper.cpp repository, copy the main
executable into src-tauri/binaries
of the whisper-ui repository and rename it to whisper
.
Then, copy the model you've downloaded from the models
folder into src-tauri/resources/models
. In my case, it was whisper.cpp/models/ggml-medium.bin
-> whisper-ui/src-tauri/resources/models/ggml-medium.bin
.
Change the name of the modelpath
variable in the src/lib/util/whisper.ts
file to the name of your model.
(Optional) if transcribing languages other than English, still in the whisper.ts
file you can add your language of choice in the Whisper CLI command arguments of the transcribe
variable:
const transcribe = Command.sidecar('binaries/whisper', [
'-m',
modelPath,
'-f',
file.transformedPath,
'--language',
"pt" // your language code here
]);
Hello! Sorry I've basically abandoned this project, but I didn't realize how many people actually were still using it.
I'd love to fix the issues with bundling binaries, but I'm not really that experienced with it. I'll be happy to accept any PRs or advice on how to get the binaries bundled to make this usable out of the box!
It is really hard as the Files are so big, i think the easiest Solution would be to add a Download link to the binaries and a Guide on how to install them somewhere in the readme. But honestly mate your project is really awesome on once you get it to run it works really good.
@JugoBonito makes sense. What I might try do then is see if I can get this to build with no binaries, then have the client download and save the binaries with a few clicks without messing with the source
That would be very cool
@JugoBonito makes sense. What I might try do then is see if I can get this to build with no binaries, then have the client download and save the binaries with a few clicks without messing with the source
Any progress on this?
any update on this?
how to build on M1? I tried npm run tauri build and end with error below
error: failed to run custom build command for
whisper-ui v0.0.0 (/Users/chenzhiyu/Downloads/whisper-ui-main/src-tauri)