Photon Voice
v2.58
Calibration Utility for Voice Detector More...
Inherits IProcessor< T >.
Public Member Functions | |
| VoiceDetectorCalibration (IVoiceDetector voiceDetector, ILevelMeter levelMeter, int samplingRate, int channels) | |
| Create new VoiceDetectorCalibration instance. More... | |
| void | Calibrate (int durationMs, Action< float > onCalibrated=null) |
| Start calibration. More... | |
| T[] | Process (T[] buf) |
| Process a frame of data. More... | |
| void | Dispose () |
Protected Attributes | |
| int | calibrateCount |
Properties | |
| bool | IsCalibrating [get] |
Calibration Utility for Voice Detector
. Using this audio processor, you can calibrate the IVoiceDetector.Threshold.
| VoiceDetectorCalibration | ( | IVoiceDetector | voiceDetector, |
| ILevelMeter | levelMeter, | ||
| int | samplingRate, | ||
| int | channels | ||
| ) |
Create new VoiceDetectorCalibration instance.
| voiceDetector | Voice Detector to calibrate. |
| levelMeter | Level Meter to look at for calibration. |
| samplingRate | Sampling rate of the audio signal (in Hz). |
| channels | Number of channels in the audio signal. |
| void Calibrate | ( | int | durationMs, |
| Action< float > | onCalibrated = null |
||
| ) |
Start calibration.
| durationMs | Duration of the calibration procedure (in milliseconds). |
| onCalibrated | Optional callback that is called after calibration is complete. |
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.
| T [] Process | ( | T[] | buf | ) |
Process a frame of data.
| buf | Buffer containing input data |
Implements IProcessor< T >.