Photon Voice v2.53

Public Member Functions | Properties | List of all members
ILocalVoiceAudio Interface Reference

Interface for an outgoing audio stream. More...

Inherited by LocalVoiceAudio< T >, and LocalVoiceAudioDummy.

Public Member Functions

void VoiceDetectorCalibrate (int durationMs, Action< float > onCalibrated=null)
 Trigger voice detector calibration process. More...
 

Properties

AudioUtil.IVoiceDetector VoiceDetector [get]
 The VoiceDetector in use. More...
 
AudioUtil.ILevelMeter LevelMeter [get]
 The LevelMeter utility in use. More...
 
bool VoiceDetectorCalibrating [get]
 If true, voice detector calibration is in progress. More...
 

Detailed Description

Interface for an outgoing audio stream.

A LocalVoice always brings a LevelMeter and a VoiceDetector, which you can access using this interface.

Member Function Documentation

◆ VoiceDetectorCalibrate()

void VoiceDetectorCalibrate ( int  durationMs,
Action< float >  onCalibrated = null 
)

Trigger voice detector calibration process.

While calibrating, keep silence. Voice detector sets threshold based on measured backgroud noise level.

Parameters
durationMsDuration of calibration (in milliseconds).
onCalibratedCalled when calibration is complete. Parameter is new threshold value.

Implemented in LocalVoiceAudioDummy, and LocalVoiceAudio< T >.

Property Documentation

◆ LevelMeter

AudioUtil.ILevelMeter LevelMeter
get

The LevelMeter utility in use.

◆ VoiceDetector

AudioUtil.IVoiceDetector VoiceDetector
get

The VoiceDetector in use.

Use it to enable or disable voice detector and set its parameters.

◆ VoiceDetectorCalibrating

bool VoiceDetectorCalibrating
get

If true, voice detector calibration is in progress.