Repository navigation
Fixed VAD to work when using whisper_full_with_state - #3423
mdestagnol wants to merge 2 commits into
Conversation
|
@mdestagnol Thanks for the pull request. I've been thinking about this and if I recall correctly, the original pr for VAD actually did something like this. I recall getting feedback about the state should be passed in and not be updated inside of this function (I've not been able to find the comment though I'm afraid). So I think exposing |
Isn't state's purpose to persist the context of whisper_full? State is how the |
|
Whatever route is taken, this should be documented anyways since it was extremely confusing wondering why VAD wasn't working despite having the switch on. |
Sorry, I make a mistake (recalled incorrectly) about the reason for moving the VAD processing out of |
whisper.cpp's built-in whisper_full VAD does not run for whisper_full_with_state, which the crate uses for all transcription (ggml-org/whisper.cpp#3423). Point users at WhisperVadProcessor, EnhancedWhisperVadProcessor and WhisperStreamPcm::with_vad instead.
* chore: update whisper.cpp pin to 1.9.4-dev (stream-pcm de8fb5fd) Moves the pinned rmorse/whisper.cpp stream-pcm fork from ddfe1196 (v1.8.6) to de8fb5fd (tag v1.9.4-dev-stream-pcm), based on upstream master after v1.9.3. whisper.h changes in this range are additive only, so no binding or API changes are needed. Parakeet and the new VAD timestamp/segment accessors are left for a follow-up feature branch. Picks up the upstream whisper_full_parallel timestamp overflow fix (ggml-org/whisper.cpp#4044). * docs: correct changelog for whisper.cpp 1.9 pin Drop the whisper_full_parallel fix entry: WhisperState::full_parallel reads results from its own state while upstream writes them to the context's default state, so the upstream fix never reached crate users (to be fixed separately). Document user-visible upstream behaviour changes in the pinned range and why the new VAD accessors are not exposed. * docs: recommend the crate's VAD over whisper.cpp's built-in VAD whisper.cpp's built-in whisper_full VAD does not run for whisper_full_with_state, which the crate uses for all transcription (ggml-org/whisper.cpp#3423). Point users at WhisperVadProcessor, EnhancedWhisperVadProcessor and WhisperStreamPcm::with_vad instead.
Currently
whisper_full_with_statedoesn't work with VAD.The main inference method is
whisper_full_with_state. This method takes awhisper_contextand awhisper_state. On top of this method are built 2 convenience methods,whisper_fullandwhisper_full_parallel.The VAD logic is currently only implemented in those convenience methods, but not in
whisper_full_with_stateitself. This is an issue whenever we need to deal with more than one state (when processing multiple real time streams for example).This pull request moves the logic into
whisper_full_with_stateand fix a few incorrect calls toctx->stateinstead ofstatedirectly.