tazz4843 / whisper-rs

Rust bindings to https://github.com/ggerganov/whisper.cpp
The Unlicense
607 stars 105 forks source link

fix windows gnu build #110

Closed thewh1teagle closed 5 months ago

thewh1teagle commented 5 months ago

I tried to use this library on windows inside msys2, following BUILDING.md and got bunch of erros. Fixed all of them and planning to improve the instructions as well. Checked in msys2 and it works with the examples of this repo.

https://github.com/tazz4843/whisper-rs/issues/87 https://github.com/tazz4843/whisper-rs/issues/65

Steps to build:

  1. Download msys2 from https://www.msys2.org/ and install

  2. Install prerequisites from ucrt64 terminal

    pacman --needed -S $MINGW_PACKAGE_PREFIX-{toolchain,make,cmake,rust,clang} git
  3. Clone

    git clone -b fix/msys2-build --recursive https://github.com/thewh1teagle/whisper-rs.git
    cd whisper-rs
  4. Build

    cargo build
  5. Try it

    wget -q --show-progress \
    https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-base.en.bin -O ggml-base.en.bin
    cd examples/full_usage
    cargo run 2830-3980-0043.wav ../../ggml-base.en.bin
tazz4843 commented 5 months ago

Thanks :)