Skip to content

Conversation

danbev
Copy link
Member

@danbev danbev commented Jun 17, 2025

This commit clears the results_all vector no VAD segments are found.

The motivation for this is that this would normally be done by
whisper_full_with_state but when no VAD segments are detected this
current implementation does not call that function and hence the vector
does not get reset. This can lead to issues in applications like the
server example where it will incorrectly process the old results.

Resolves: #3250

@danbev danbev requested a review from ggerganov June 17, 2025 12:47
@ggerganov
Copy link
Member

Instead of adding this check can we simply clear the response after sending it to the user?

This commit clears the results_all vector no VAD segments are found.

The motivation for this is that this would normally be done by
`whisper_full_with_state` but when no VAD segments are detected this
current implementation does not call that function and hence the vector
does not get reset. This can lead to issues in applications like the
server example where it will incorrectly process the old results.

Resolves: ggml-org#3250
@danbev danbev force-pushed the server-vad-empty-reponse branch from e2f1e63 to d2551be Compare June 17, 2025 14:24
@danbev danbev changed the title whisper : add whisper_vad_has_segments function whisper : clear result_all if vad_samples is empty Jun 17, 2025
@danbev
Copy link
Member Author

danbev commented Jun 17, 2025

Instead of adding this check can we simply clear the response after sending it to the user?

Yes, you are right and I've updated with a commit that now clears results_all if there are no VAD segments detected. This will then return an response with an empty test field. Is this what you had in mind?

@danbev danbev merged commit 1591558 into ggml-org:master Jun 18, 2025
54 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[vad] Previous response is returned by server if no voice activity is detected in the sample

2 participants