Page 1 of 1

Transcribing audio with Whisper.cpp

Posted: Wed Oct 30, 2024 4:11 pm
by Adrian
Take a look at this amazing project https://github.com/ggerganov/whisper.cpp

You have the instructions in the repo, but it's basically:

Code: Select all

git clone https://github.com/ggerganov/whisper.cpp.git
cd whisper.cpp
sh ./models/download-ggml-model.sh base.en

# build the main example
make -j

# transcribe an audio file
./main -f samples/jfk.wav

Re: Transcribing audio with Whisper.cpp

Posted: Wed Oct 30, 2024 4:13 pm
by dolphin_oracle
I was just hearing someone talking about that yesterday.

Re: Transcribing audio with Whisper.cpp

Posted: Wed Oct 30, 2024 4:16 pm
by Adrian
I heard it from Alex Stamos on TWiT.tv

Re: Transcribing audio with Whisper.cpp

Posted: Thu Oct 31, 2024 6:24 am
by operadude
Adrian wrote: Wed Oct 30, 2024 4:11 pm Take a look at this amazing project https://github.com/ggerganov/whisper.cpp

You have the instructions in the repo, but it's basically:

Code: Select all

git clone https://github.com/ggerganov/whisper.cpp.git
cd whisper.cpp
sh ./models/download-ggml-model.sh base.en

# build the main example
make -j

# transcribe an audio file
./main -f samples/jfk.wav
:number1:

Very clear instructions!

Thanks for the "make -j" line!!!
Since I don't work with compiled languages ( :bagoverhead: :bagoverhead: ), I never would have succeeded in implementing this wicked-cool project.

I just added output to a file:

Code: Select all

./main -m /mnt/Testing/github-projects/whisper.cpp/models/ggml-base.en.bin -f samples/jfk.wav > test.txt
Time to Play :exclamation: :happy:

Re: Transcribing audio with Whisper.cpp

Posted: Thu Oct 31, 2024 7:28 am
by Jerry3904
That looks pretty interesting, will have to take a look.

Re: Transcribing audio with Whisper.cpp

Posted: Thu Oct 31, 2024 5:38 pm
by Stevo
Hmmm--shouldn't that "make -j" include a number after the "j" to specify how many CPU cores the build is supposed to use?

Re: Transcribing audio with Whisper.cpp

Posted: Thu Oct 31, 2024 5:50 pm
by Adrian
From what I understand it will use as many jobs it can create if you don't specify a number. I assume it won't create an infinite number of jobs though what it means is that it will create as many jobs as threads available (so on a hyperthreaded 8-core CPU for example it will create 16)
-j [N], --jobs[=N] Allow N jobs at once; infinite jobs with no arg.

Re: Transcribing audio with Whisper.cpp

Posted: Fri Nov 01, 2024 3:29 am
by operadude
Adrian wrote: Thu Oct 31, 2024 5:50 pm From what I understand it will use as many jobs it can create if you don't specify a number. I assume it won't create an infinite number of jobs though what it means is that it will create as many jobs as threads available (so on a hyperthreaded 8-core CPU for example it will create 16)
-j [N], --jobs[=N] Allow N jobs at once; infinite jobs with no arg.
Thanks, Adrian.

Here is a quote from the "make" man page, which seems to say it in a less ambiguous way (without invoking "infinity"):
-j [jobs], --jobs[=jobs]
Specifies the number of jobs (commands) to run simultaneously. If there is more than one
-j option, the last one is effective. If the -j option is given without an argument, make
will not limit the number of jobs that can run simultaneously. When make invokes a sub-
make, all instances of make will coordinate to run the specified number of jobs at a time;
see the section PARALLEL MAKE AND THE JOBSERVER for details.
Again, thanks for the thread.

Have wanted for some time to get back on the bike with the "1TBS" group. ;)

:cool: