Add whisper-stream-pcm: stdin/pipe PCM streaming with VAD support#3653
Open
rmorse wants to merge 11 commits intoggml-org:masterfrom
Open
Add whisper-stream-pcm: stdin/pipe PCM streaming with VAD support#3653rmorse wants to merge 11 commits intoggml-org:masterfrom
rmorse wants to merge 11 commits intoggml-org:masterfrom
Conversation
This was referenced Feb 7, 2026
Member
|
Thanks, this looks interesting. Would you mind rebasing on the latest |
Author
|
@ggerganov done :) Thanks for considering this. After double checking, there were some upstream warnings / patterns which I didn't change for stream-pcm but did find and fix a casting issue along the way. |
Member
|
Ok, let's see how the builds go. I'm interested in adding such example. Need to find some time to play with this. Hopefully other people would provide some additional feedback in the meantime. |
Author
|
I managed to a build a release against the last stable release and seemed to work well (on windows at least) Just patching that CI issue now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
whisper-stream-pcm, a new example binary for streaming raw PCM audio via stdin/pipe for real-time transcription — no WAV headers or SDL2 requiredUsage
With Silero VAD:
Using FFMPEG to test/pipe in the data
ffmpeg -i audio.wav -f f32le -ar 16000 -ac 1 pipe:1 | whisper-stream-pcm -m models/ggml-base.en.bin --vad --vad-model models/silero-vad.binChanges
examples/stream-pcm/— new example binary (stream-pcm.cpp, CMakeLists.txt, README.md)examples/CMakeLists.txt— register stream-pcm exampletests/test-stream-pcm.cpp— test for stdin/pipe PCM streamingtests/CMakeLists.txt— register testREADME.md— mention stream-pcm in examples listTest plan
whisper-stream-pcmbuilds on Linux/macOS/Windows--vad(simple) and--vad --vad-model(Silero) both work correctlyctestpasses test-stream-pcm