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

Calibration Utility for Voice Detector More...

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

Public Member Functions

 VoiceDetectorCalibration (IVoiceDetector *pVoiceDetector, ILevelMeter *pLevelMeter, int samplingRate, int channels)
 Create new VoiceDetectorCalibration instance. More...
 
bool isCalibrating (void) const
 
void calibrate (int durationMs)
 Start calibration. More...
 
virtual Buffer< T > process (Buffer< T > buf)
 Process a frame of audio data. More...
 
- 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::VoiceDetectorCalibration< T >

Calibration Utility for Voice Detector

. Using this audio processor, you can calibrate the Threshold property of IVoiceDetector.

Constructor & Destructor Documentation

◆ VoiceDetectorCalibration()

VoiceDetectorCalibration ( IVoiceDetector pVoiceDetector,
ILevelMeter pLevelMeter,
int  samplingRate,
int  channels 
)

Create new VoiceDetectorCalibration instance.

Parameters
pVoiceDetectorVoice Detector to calibrate.
pLevelMeterLevel Meter to look at for calibration.
samplingRateSampling rate of the audio signal (in Hz).
channelsNumber of channels in the audio signal.

Member Function Documentation

◆ calibrate()

void calibrate ( int  durationMs)

Start calibration.

Parameters
durationMsDuration of the calibration procedure (in milliseconds).

This activates the Calibration process. It will reset the given LevelMeter's AccumAvgPeakAmp (accumulated average peak amplitude), and when the duration has passed, use it for the VoiceDetector's detection threshold.

◆ 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 >.