Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vad patch #1369

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Vad patch #1369

wants to merge 6 commits into from

Conversation

laochen
Copy link

@laochen laochen commented Sep 22, 2024

Optimized the sharding logic, the SpeechSegment time period is controlled in the voice-activity-detector module, and the export of the last flush is more concise

@csukuangfj
Copy link
Collaborator

  1. Could you revert unrelated changes?

  2. Please remove debug statements.

  3. Please use English comments.

@laochen
Copy link
Author

laochen commented Sep 26, 2024

OK, I'll sort it out. The another LFR that affects the recognition result can be processed separately.

@@ -102,12 +101,12 @@ bool SileroVadModelConfig::Validate() const {
std::string SileroVadModelConfig::ToString() const {
std::ostringstream os;

os << "SileroVadModelConfig(";
os << "SilerVadModelConfig(";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please don't change it.

@@ -31,8 +31,7 @@ void SileroVadModelConfig::Register(ParseOptions *po) {
po->Register(
"silero-vad-max-speech-duration", &max_speech_duration,
"In seconds. If a speech segment is longer than this value, then we "
"increase the threshold to 0.9. After finishing detecting the segment, "
"the threshold value is reset to its original value.");
"cut a segment.");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please don't remove it.

// the threshold to 0.9. After finishing detecting the segment,
// the threshold value is reset to its original value.
float max_speech_duration = 20; // in seconds
float max_speech_duration = 20; // in seconds
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please don't remove the comments.

Comment on lines 35 to +42
min_silence_samples_ =
sample_rate_ * config_.silero_vad.min_silence_duration;
(int32_t)(sample_rate_ * config_.silero_vad.min_silence_duration);

min_speech_samples_ = sample_rate_ * config_.silero_vad.min_speech_duration;
min_speech_samples_ =
(int32_t)(sample_rate_ * config_.silero_vad.min_speech_duration);

max_speech_samples_ =
(int32_t)(sample_rate_ * config_.silero_vad.max_speech_duration);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason to make such changes?

@csukuangfj
Copy link
Collaborator

By the way, could you describe the issue this PR tries to fix?

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.

2 participants