You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
whisper.cpp/examples/stream
Georgi Gerganov 3c390ffe38
stream.wasm : add web-based real-time transcription (#112)
1 year ago
..
CMakeLists.txt refactoring : move main + stream in examples + other stuff 2 years ago
README.md stream.wasm : add web-based real-time transcription (#112) 1 year ago
stream.cpp whisper.wasm : do not block page while processing (close #86) 1 year ago

README.md

stream

This is a naive example of performing real-time inference on audio from your microphone. The stream tool samples the audio every half a second and runs the transcription continously. More info is available in issue #10.

./stream -m ./models/ggml-base.en.bin -t 8 --step 500 --length 5000

https://user-images.githubusercontent.com/1991296/194935793-76afede7-cfa8-48d8-a80f-28ba83be7d09.mp4

The stream tool depends on SDL2 library to capture audio from the microphone. You can build it like this:

# Install SDL2 on Linux
sudo apt-get install libsdl2-dev

# Install SDL2 on Mac OS
brew install sdl2

make stream

Web version

This tool can also run in the browser: examples/stream.wasm