fix(vad): add support for vad reset directly without stream close#5687
Open
chenghao-mou wants to merge 5 commits into
Open
fix(vad): add support for vad reset directly without stream close#5687chenghao-mou wants to merge 5 commits into
chenghao-mou wants to merge 5 commits into
Conversation
add vad stream reset method directly so that we don't have to close the stream or task this closes #5674
longcw
reviewed
May 11, 2026
|
|
||
| Only effective when the underlying VAD advertises | ||
| `VADCapabilities.supports_reset`. For implementations that do not | ||
| support reset, the sentinel is silently dropped; callers that need a |
Contributor
There was a problem hiding this comment.
should we raise an error when reset is not supported?
Member
Author
There was a problem hiding this comment.
good point. I'll add that.
theomonnom
reviewed
May 13, 2026
Comment on lines
162
to
166
| def flush(self) -> None: | ||
| """Mark the end of the current segment""" | ||
| self._check_input_not_ended() | ||
| self._check_not_closed() | ||
| self._input_ch.send_nowait(self._FlushSentinel()) |
Member
There was a problem hiding this comment.
Do you think we need reset? Maybe flush could just do it?
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.
add vad stream reset method directly so that we don't have to close the stream or task
resetting directly with a new resampler and buffer zero-fill should take less than 0.1ms.
this closes #5674