Download and try the demo

Here is the github of whisper.cpp

make base.en
make medium
make large-v3
/main -m models/ggml-base.en.bin -f samples/jfk.wav

For Chinese Support

./main -m ./models/ggml-medium.bin  -t 8 --step 500 --length 5000 --prompt "请用简体中文输出" -l zh

Live stream

 make stream
 ./stream -l auto -m ./models/ggml-base.en.bin -t 8 --step 500 --length 5000 
 ./stream -l auto -m ./models/ggml-medium.bin -t 8 --step 500 --length 5000 
 ./stream -l auto -m ./models/ggml-large-v3.bin -t 8 --step 500 --length 5000 

Download Youtube



./main -m ./models/ggml-base.en.bin -f ./samples/jfk.wav -owts
source ./samples/jfk.wav.wts
ffplay ./samples/jfk.wav.mp4



Convert mp4 to wav/mp3 via ffmpeg

ffmpeg -i input.mp4 input.mp4.wav

You can reduce the file size

ffmpeg -i input.mp4 -ar 22050 -ab 128k output.wav
ffmpeg -i input.mp4 input.mp4.mp3

Bash Script

Put the convert code into the bash script.

function .toWAV() {
  .log "ffmpeg -i $1 ${1%.mp4}.wav"
  ffmpeg -i $1 ${1%.mp4}.wav

function .toSrt() {
  .log "./main -m ./models/ggml-base.en.bin -f $1 -osrt"
  cd ~/pythonProject/whisper.cpp && ./main -m ./models/ggml-base.en.bin -f $1 -osrt
Whisper.cpp Playground

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.