Analyzes the incoming audio and checks whether there was any voice activity.
More...
#include <VoiceActivityDetectorNode.hpp>
|
std::string | name |
| The name of the audio node.
|
|
std::string | type |
|
std::vector< std::unique_ptr< Parameter > > | parameters |
|
Analyzes the incoming audio and checks whether there was any voice activity.
VoiceActivityDetectorNode class
◆ consume()
bool switchboard::VoiceActivityDetectorNode::consume |
( |
AudioBus & | bus | ) |
|
|
overridevirtual |
Consumes audio data from the given bus.
Should be overridden by subclasses.
- Parameters
-
bus | The bus that contain the audio data. |
- Returns
- True if audio was consumed successfully, false otherwise.
Implements switchboard::SingleBusAudioSinkNode.
◆ getGainTriggerThreshold()
float switchboard::VoiceActivityDetectorNode::getGainTriggerThreshold |
( |
| ) |
const |
Returns the current audio level trigger threshold.
- Returns
- Trigger threshold.
◆ getHangoverDuration()
float switchboard::VoiceActivityDetectorNode::getHangoverDuration |
( |
| ) |
const |
Returns the current hangover duration.
- Returns
- Hangover duration.
◆ getStatus()
VoiceActivityDetector::Status switchboard::VoiceActivityDetectorNode::getStatus |
( |
| ) |
|
Returns the last buffers VAD status.
- Returns
- The last VAD status.
◆ getTriggerDuration()
float switchboard::VoiceActivityDetectorNode::getTriggerDuration |
( |
| ) |
const |
Returns the current trigger duration.
- Returns
- Trigger duration.
◆ setBusFormat()
bool switchboard::VoiceActivityDetectorNode::setBusFormat |
( |
AudioBusFormat & | busFormat | ) |
|
|
overridevirtual |
Sets bus format.
Should be overridden by subclasses.
- Parameters
-
busFormat | The bus format to set. |
- Returns
- True if the bus format was set successfully, false otherwise.
Implements switchboard::SingleBusAudioSinkNode.
◆ setGainTriggerThreshold()
void switchboard::VoiceActivityDetectorNode::setGainTriggerThreshold |
( |
float | threshold | ) |
|
Sets the audio level trigger amount for the VAD.
- Parameters
-
threshold | The new threshold. |
◆ setHangoverDuration()
void switchboard::VoiceActivityDetectorNode::setHangoverDuration |
( |
float | duration | ) |
|
Sets the duration of the VAD hangover.
- Parameters
-
duration | The new duration. |
◆ setTriggerDuration()
void switchboard::VoiceActivityDetectorNode::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. |