Skip to content

Commit

Permalink
tie slider to rnnoise probability threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
ouwou committed Aug 2, 2023
1 parent 60a8c86 commit d208c64
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/audio/manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,10 @@ double AudioManager::GetRNNProbThreshold() const {
return m_prob_threshold;
}

void AudioManager::SetRNNProbThreshold(double value) {
m_prob_threshold = value;
}

AudioManager::type_signal_opus_packet AudioManager::signal_opus_packet() {
return m_signal_opus_packet;
}
Expand Down
1 change: 1 addition & 0 deletions src/audio/manager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ class AudioManager {

float GetCurrentVADProbability() const;
double GetRNNProbThreshold() const;
void SetRNNProbThreshold(double value);

private:
void OnCapturedPCM(const int16_t *pcm, ma_uint32 frames);
Expand Down
2 changes: 2 additions & 0 deletions src/windows/voicewindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ VoiceWindow::VoiceWindow(Snowflake channel_id)
break;
#ifdef WITH_RNNOISE
case AudioManager::VADMethod::RNNoise:
audio.SetRNNProbThreshold(val);
m_vad_value.SetTick(val);
break;
#endif
};
Expand Down

0 comments on commit d208c64

Please sign in to comment.