Photon Voice  v2.8
English | 日本語 | 한국
Public Member Functions | Protected Attributes | Properties | Events | List of all members
AudioUtil.VoiceDetector< T > Class Template Referenceabstract

Simple voice activity detector triggered by signal level. More...

Inherits IProcessor< T >, and AudioUtil.IVoiceDetector.

Public Member Functions

abstract T[] Process (T[] buf)
 Process a frame of audio data. More...
 
void Dispose ()
 

Protected Attributes

int activityDelay
 
int autoSilenceCounter = 0
 
int valuesCountPerSec
 
int activityDelayValuesCount
 

Properties

bool On [get, set]
 If true, voice detection enabled. More...
 
float Threshold [get, set]
 Voice detected as soon as signal level exceeds threshold. More...
 
bool Detected [get, protected set]
 If true, voice detected. More...
 
DateTime DetectedTime [get]
 Last time when switched to detected state. More...
 
int ActivityDelayMs [get, set]
 Keep detected state during this time after signal level dropped below threshold. More...
 
- Properties inherited from AudioUtil.IVoiceDetector
bool On [get, set]
 If true, voice detection enabled. More...
 
float Threshold [get, set]
 Voice detected as soon as signal level exceeds threshold. More...
 
bool Detected [get]
 If true, voice detected. More...
 
DateTime DetectedTime [get]
 Last time when switched to detected state. More...
 
int ActivityDelayMs [get, set]
 Keep detected state during this time after signal level dropped below threshold. More...
 

Events

Action OnDetected
 Called when switched to detected state. More...
 
- Events inherited from AudioUtil.IVoiceDetector
Action OnDetected
 Called when switched to detected state. More...
 

Detailed Description

Simple voice activity detector triggered by signal level.

Member Function Documentation

abstract T [] Process ( T[]  buf)
pure virtual

Process a frame of audio data.

Parameters
bufBuffer containing input audio data
Returns
Buffer containing output audio data

Implements IProcessor< T >.

Property Documentation

int ActivityDelayMs
getset

Keep detected state during this time after signal level dropped below threshold.

bool Detected
getprotected set

If true, voice detected.

DateTime DetectedTime
get

Last time when switched to detected state.

bool On
getset

If true, voice detection enabled.

float Threshold
getset

Voice detected as soon as signal level exceeds threshold.

Event Documentation

Action OnDetected

Called when switched to detected state.