Photon C++ Client API  5.0.7.3
Public Member Functions | List of all members
VoiceDetector< T > Class Template Reference

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

Inheritance diagram for VoiceDetector< T >:
Inheritance graph
[legend]
Collaboration diagram for VoiceDetector< T >:
Collaboration graph
[legend]

Public Member Functions

 VoiceDetector (int samplingRate, int numChannels)
 
virtual Buffer< T > process (Buffer< T > buf)
 Process a frame of audio data. More...
 
virtual bool getOn (void) const
 If true, voice detection enabled. More...
 
virtual void setOn (bool)
 
virtual float getThreshold (void) const
 Voice detected as soon as signal level exceeds threshold. More...
 
virtual void setThreshold (float)
 
virtual bool getDetected (void) const
 If true, voice detected. More...
 
virtual int getDetectedTime (void) const
 Last time when switched to detected state. More...
 
virtual void setOnDetected (void(*pCallback)(void))
 Called when switched to detected state. More...
 
virtual int getActivityDelayMs (void) const
 Keep detected state during this time after signal level dropped below threshold. More...
 
virtual void setActivityDelayMs (int)
 
- Public Member Functions inherited from ToStringDefaultImplementation
virtual JStringtoString (JString &retStr, bool withTypes=false) const
 
virtual JStringtoString (JString &retStr, bool withTypes=false) const=0
 
JString toString (bool withTypes=false) const
 
- Public Member Functions inherited from ToString
virtual ~ToString (void)
 
virtual JString typeToString (void) const
 
JString toString (bool withTypes=false) const
 

Detailed Description

template<typename T>
class ExitGames::Voice::AudioUtil::VoiceDetector< T >

Simple voice activity detector triggered by signal level.

Member Function Documentation

◆ process()

Buffer< T > process ( Buffer< T >  buf)
virtual

Process a frame of audio data.

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

Implements IProcessor< T >.

◆ getOn()

bool getOn ( void  ) const
virtual

If true, voice detection enabled.

Implements IVoiceDetector.

◆ getThreshold()

float getThreshold ( void  ) const
virtual

Voice detected as soon as signal level exceeds threshold.

Implements IVoiceDetector.

◆ getDetected()

bool getDetected ( void  ) const
virtual

If true, voice detected.

Implements IVoiceDetector.

◆ getDetectedTime()

int getDetectedTime ( void  ) const
virtual

Last time when switched to detected state.

Implements IVoiceDetector.

◆ setOnDetected()

void setOnDetected ( void(*)(void)  pCallback)
virtual

Called when switched to detected state.

Implements IVoiceDetector.

◆ getActivityDelayMs()

int getActivityDelayMs ( void  ) const
virtual

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

Implements IVoiceDetector.