Voice Activity Detector.
More...
#include <VoiceActivityDetector.hpp>
|
enum class | Status { VoiceDetected = 0
, Hangover = 1
, Idle = 2
} |
|
|
| VoiceActivityDetector () |
| Voice Activity Detector constructor.
|
|
Status | process (AudioBuffer< float > &inputBuffer) |
| Processes an audio buffer and returns the new VAD status.
|
|
void | setHangoverDuration (float duration) |
| Sets the duration of the VAD hangover in seconds.
|
|
float | getHangoverDuration () const |
| Returns the current hangover duration in seconds.
|
|
void | setGainTriggerThreshold (float threshold) |
| Sets the audio level trigger amount for the VAD.
|
|
float | getGainTriggerThreshold () const |
| Returns the current audio level trigger threshold.
|
|
void | setTriggerDuration (float duration) |
| Sets the amount of seconds the audio signal must be higher than the trigger threshold for the VAD to be activated.
|
|
float | getTriggerDuration () const |
| Returns the current trigger duration.
|
|
◆ getGainTriggerThreshold()
float switchboard::VoiceActivityDetector::getGainTriggerThreshold |
( |
| ) |
const |
Returns the current audio level trigger threshold.
- Returns
- Trigger threshold.
◆ getHangoverDuration()
float switchboard::VoiceActivityDetector::getHangoverDuration |
( |
| ) |
const |
Returns the current hangover duration in seconds.
- Returns
- Hangover duration in seconds.
◆ getTriggerDuration()
float switchboard::VoiceActivityDetector::getTriggerDuration |
( |
| ) |
const |
Returns the current trigger duration.
- Returns
- Trigger duration.
◆ process()
VoiceActivityDetector::Status switchboard::VoiceActivityDetector::process |
( |
AudioBuffer< float > & | inputBuffer | ) |
|
Processes an audio buffer and returns the new VAD status.
- Parameters
-
inputBuffer | The input audio buffer. |
- Returns
- The VAD status.
◆ setGainTriggerThreshold()
void switchboard::VoiceActivityDetector::setGainTriggerThreshold |
( |
float | threshold | ) |
|
Sets the audio level trigger amount for the VAD.
- Parameters
-
threshold | The new threshold. |
◆ setHangoverDuration()
void switchboard::VoiceActivityDetector::setHangoverDuration |
( |
float | duration | ) |
|
Sets the duration of the VAD hangover in seconds.
- Parameters
-
duration | The new duration in seconds. |
◆ setTriggerDuration()
void switchboard::VoiceActivityDetector::setTriggerDuration |
( |
float | duration | ) |
|
Sets the amount of seconds the audio signal must be higher than the trigger threshold for the VAD to be activated.
- Parameters
-
duration | The new duration. |